refactor: remove redundant destroyPool function
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
@@ -140,8 +140,10 @@ initWithPool pool conf loggerState metricsState observer appKiller = mdo
|
|||||||
|
|
||||||
return appState
|
return appState
|
||||||
|
|
||||||
|
-- | Destroy the pool on shutdown.
|
||||||
|
-- | Differs from flushPool in not emiting PoolFlushed observation.
|
||||||
destroy :: AppState -> IO ()
|
destroy :: AppState -> IO ()
|
||||||
destroy = destroyPool
|
destroy AppState{..} = SQL.release statePool
|
||||||
|
|
||||||
initPool :: AppConfig -> ObservationHandler -> IO SQL.Pool
|
initPool :: AppConfig -> ObservationHandler -> IO SQL.Pool
|
||||||
initPool cfg@AppConfig{..} observer = do
|
initPool cfg@AppConfig{..} observer = do
|
||||||
@@ -226,11 +228,6 @@ flushPool AppState{..} = do
|
|||||||
SQL.release statePool
|
SQL.release statePool
|
||||||
stateObserver PoolFlushed
|
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 :: AppState -> IO PgVersion
|
||||||
getPgVersion = readIORef . statePgVersion
|
getPgVersion = readIORef . statePgVersion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user