Only start queue workers/processing in web-api pods (#11800)

* Only start queue workers/processing in web-api pods

GitOrigin-RevId: 62fedd377bef4c024d6206b68f14cda8bd5d11c7
This commit is contained in:
Thomas 2023-02-23 14:14:25 +01:00 committed by Copybot
parent 85a83c143e
commit 817d1cffaf

View file

@ -71,7 +71,9 @@ if (!module.parent) {
// wait until the process is ready before monitoring the event loop
metrics.event_loop.monitor(logger)
})
QueueWorkers.start()
if (process.env.QUEUE_PROCESSING_ENABLED === 'true') {
QueueWorkers.start()
}
})
.catch(err => {
logger.fatal({ err }, 'Cannot connect to mongo. Exiting.')