fix: slow responses on schema cache reload
This commit is contained in:
committed by
Steve Chavez
parent
210cded560
commit
727ef465c1
@@ -319,10 +319,12 @@ loadSchemaCache appState observer = do
|
||||
return SCOnRetry
|
||||
|
||||
Right sCache -> do
|
||||
putSchemaCache appState $ Just sCache
|
||||
observer $ SchemaCacheQueriedObs resultTime
|
||||
(t, _) <- timeItT $ observer $ SchemaCacheSummaryObs sCache
|
||||
observer $ SchemaCacheLoadedObs t
|
||||
-- it's important to update AppState schema cache only once it has been fully evaluated before (this will be done by the observer above)
|
||||
-- otherwise requests will wait for the schema cache to be loaded
|
||||
putSchemaCache appState $ Just sCache
|
||||
putSchemaCacheLoaded appState True
|
||||
return SCLoaded
|
||||
|
||||
|
||||
Reference in New Issue
Block a user