IHP Api Reference
Safe HaskellNone

IHP.DataSync.ControllerImpl

Synopsis

Documentation

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

runInModelContextWithTransaction :: (?state :: IORef DataSyncController, ?modelContext :: ModelContext) => ((?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.

atomicModifyIORef'' :: IORef t -> (t -> t) -> IO () Source #

Orphan instances