Skip to content

Commit

Permalink
Use logInfo/logError, and set flag to bottom of fn (#3260)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicky-g authored and raymondjacobson committed Jun 25, 2022
1 parent e3adccc commit cc02841
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions creator-node/src/serviceRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ServiceRegistry {
}

setupBullMonitoring(app, stateMonitoringQueue, stateReconciliationQueue) {
logger.info('Setting up Bull queue monitoring...')
this.logInfo('Setting up Bull queue monitoring...')

const serverAdapter = new ExpressAdapter()
const { stateMachineQueue, manualSyncQueue, recurringSyncQueue } =
Expand Down Expand Up @@ -170,18 +170,20 @@ class ServiceRegistry {
)
await this.skippedCIDsRetryQueue.init()

this.servicesThatRequireServerInitialized = true
this.logInfo(`All services that require server successfully initialized!`)

try {
this.setupBullMonitoring(
app,
stateMonitoringQueue,
stateReconciliationQueue
)
} catch (e) {
logger.error(`Failed to initialize bull monitoring UI: ${e.message || e}`)
this.logError(
`Failed to initialize bull monitoring UI: ${e.message || e}`
)
}

this.servicesThatRequireServerInitialized = true
this.logInfo(`All services that require server successfully initialized!`)
}

logInfo(msg) {
Expand Down

0 comments on commit cc02841

Please sign in to comment.