IHP Api Reference
Safe HaskellSafe-Inferred




cleanupAllSubscriptions :: _ => (?state :: IORef DataSyncController, ?applicationContext :: ApplicationContext) => IO () Source #

runInModelContextWithTransaction :: (?state :: IORef DataSyncController, _) => ((?modelContext :: ModelContext) => IO result) -> Maybe UUID -> IO result Source #

ensureBelowTransactionLimit :: (?state :: IORef DataSyncController, ?context :: ControllerContext) => IO () Source #

Allow max 10 concurrent transactions per connection to avoid running out of database connections

Each transaction removes a database connection from the connection pool. If we don't limit the transactions, a single user could take down the application by starting more than DBPoolMaxConnections concurrent transactions. Then all database connections are removed from the connection pool and further database queries for other users will fail.

Orphan instances