mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
server/gardening: drop an unnecessary field from 'ServeCtx'
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7108 GitOrigin-RevId: 50caff9e60d53261ce15870338bc3aa97c479190
This commit is contained in:
parent
030f9f44f2
commit
b398001c87
@ -270,15 +270,14 @@ initGlobalCtx env metadataDbUrl defaultPgConnInfo = do
|
||||
|
||||
-- | Context required for the 'serve' CLI command.
|
||||
data ServeCtx = ServeCtx
|
||||
{ _scHttpManager :: !HTTP.Manager,
|
||||
_scInstanceId :: !InstanceId,
|
||||
_scLoggers :: !Loggers,
|
||||
_scEnabledLogTypes :: !(HashSet (EngineLogType Hasura)),
|
||||
_scMetadataDbPool :: !PG.PGPool,
|
||||
_scShutdownLatch :: !ShutdownLatch,
|
||||
_scSchemaCache :: !RebuildableSchemaCache,
|
||||
_scSchemaCacheRef :: !SchemaCacheRef,
|
||||
_scMetaVersionRef :: !(STM.TMVar MetadataResourceVersion)
|
||||
{ _scHttpManager :: HTTP.Manager,
|
||||
_scInstanceId :: InstanceId,
|
||||
_scLoggers :: Loggers,
|
||||
_scEnabledLogTypes :: HashSet (EngineLogType Hasura),
|
||||
_scMetadataDbPool :: PG.PGPool,
|
||||
_scShutdownLatch :: ShutdownLatch,
|
||||
_scSchemaCacheRef :: SchemaCacheRef,
|
||||
_scMetaVersionRef :: STM.TMVar MetadataResourceVersion
|
||||
}
|
||||
|
||||
-- | Collection of the LoggerCtx, the regular Logger and the PGLogger
|
||||
@ -420,7 +419,6 @@ initialiseServeCtx env GlobalCtx {..} so@ServeOptions {..} serverMetrics = do
|
||||
soEnabledLogTypes
|
||||
metadataDbPool
|
||||
latch
|
||||
rebuildableSchemaCache
|
||||
schemaCacheRef
|
||||
metaVersionRef
|
||||
|
||||
@ -926,9 +924,10 @@ mkHGEServer setupHook env ServeOptions {..} ServeCtx {..} postPollHook serverMet
|
||||
waitForProcessingAction l actionType processingEventsCountAction' shutdownAction (maxTimeout - (Seconds 5))
|
||||
|
||||
startEventTriggerPollerThread logger lockedEventsCtx cacheRef = do
|
||||
schemaCache <- liftIO $ getSchemaCache cacheRef
|
||||
let maxEventThreads = unrefine soEventsHttpPoolSize
|
||||
fetchInterval = milliseconds $ unrefine soEventsFetchInterval
|
||||
allSources = HM.elems $ scSources $ lastBuiltSchemaCache _scSchemaCache
|
||||
allSources = HM.elems $ scSources schemaCache
|
||||
|
||||
unless (unrefine soEventsFetchBatchSize == 0 || fetchInterval == 0) $ do
|
||||
-- Don't start the events poller thread when fetchBatchSize or fetchInterval is 0
|
||||
|
Loading…
Reference in New Issue
Block a user