mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
server: fetch pending events across sources concurrently
https://github.com/hasura/graphql-engine-mono/pull/1562 GitOrigin-RevId: 763e60e8b175ba4b44aefbbf4ebe91455b8e3fff
This commit is contained in:
parent
7d2f1c0536
commit
47de5e06cf
@ -260,7 +260,8 @@ processEventQueue logger logenv httpMgr getSchemaCache EventEngineCtx{..} Locked
|
||||
-}
|
||||
pgSources <- scSources <$> liftIO getSchemaCache
|
||||
liftIO . fmap concat $
|
||||
for (M.toList pgSources) \(sourceName, sourceCache) -> concat . toList <$>
|
||||
-- fetch pending events across all the sources asynchronously
|
||||
LA.forConcurrently (M.toList pgSources) \(sourceName, sourceCache) -> concat . toList <$>
|
||||
for (unsafeSourceTables @('Postgres 'Vanilla) sourceCache) \tables -> liftIO do
|
||||
-- count the number of event triggers on tables in this source
|
||||
let eventTriggerCount = sum (M.size . _tiEventTriggerInfoMap <$> tables)
|
||||
|
Loading…
Reference in New Issue
Block a user