add: log pool flushes

Emit a dedicated PoolFlushed observation when the DB pool is released during schema cache reload.
This commit is contained in:
Michał Kłeczek
2026-04-09 10:41:29 -05:00
committed by Steve Chavez
parent ad907219be
commit 5d4f82d70f
7 changed files with 71 additions and 5 deletions
+5 -1
View File
@@ -225,10 +225,14 @@ usePool AppState{stateObserver=observer, stateMainThreadId=mainThreadId, ..} ses
-- | Flush the connection pool so that any future use of the pool will
-- use connections freshly established after this call.
-- | Emits PoolFlushed observation
flushPool :: AppState -> IO ()
flushPool AppState{..} = SQL.release statePool
flushPool AppState{..} = do
SQL.release statePool
stateObserver PoolFlushed
-- | Destroy the pool on shutdown.
-- | Differs from flushPool in not emiting PoolFlushed observation.
destroyPool :: AppState -> IO ()
destroyPool AppState{..} = SQL.release statePool