refactor: remove redundant destroyPool function

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-07-08 21:09:20 +05:00
parent c03ac09dbb
commit 0bda2bcdff
+3 -6
View File
@@ -140,8 +140,10 @@ initWithPool pool conf loggerState metricsState observer appKiller = mdo
return appState
-- | Destroy the pool on shutdown.
-- | Differs from flushPool in not emiting PoolFlushed observation.
destroy :: AppState -> IO ()
destroy = destroyPool
destroy AppState{..} = SQL.release statePool
initPool :: AppConfig -> ObservationHandler -> IO SQL.Pool
initPool cfg@AppConfig{..} observer = do
@@ -226,11 +228,6 @@ 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
getPgVersion :: AppState -> IO PgVersion
getPgVersion = readIORef . statePgVersion