refactor: move checkIsFatal logic to usePool

The fatal logic is now inside `usePool`. It centralizes the
logic which is better for Locality of Behavior.

Removes:

- The need to do checkIsFatal on other parts of the code
- SCFatalFail/ConnFatalFail states which are no longer needed.
This commit is contained in:
steve-chavez
2024-05-16 17:40:25 -05:00
committed by Steve Chavez
parent 9d763aef00
commit 33b6ba8199
5 changed files with 105 additions and 115 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ observationMetrics (MetricsState poolTimeouts poolAvailable poolWaiting _ schema
SchemaCacheLoadedObs resTime -> do
withLabel schemaCacheLoads "SUCCESS" incCounter
setGauge schemaCacheQueryTime resTime
SchemaCacheNormalErrorObs _ -> do
SchemaCacheErrorObs _ -> do
withLabel schemaCacheLoads "FAIL" incCounter
_ ->
pure ()