From ae3ebf2db6411b9ba5121b4bbb3d388151c24a0b Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 1 Oct 2019 15:02:27 +0100 Subject: [PATCH] start background flush after http server has started --- services/document-updater/app.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/document-updater/app.coffee b/services/document-updater/app.coffee index 5eb47d9c9e..82598bd93f 100644 --- a/services/document-updater/app.coffee +++ b/services/document-updater/app.coffee @@ -143,11 +143,12 @@ host = Settings.internal.documentupdater.host or "localhost" if !module.parent # Called directly app.listen port, host, -> logger.info "Document-updater starting up, listening on #{host}:#{port}" + if Settings.continuousBackgroundFlush + logger.info "Starting continuous background flush" + DeleteQueueManager.startBackgroundFlush() + module.exports = app for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT'] process.on signal, shutdownCleanly(signal) -if Settings.continuousBackgroundFlush - logger.info "Starting continuous background flush" - DeleteQueueManager.startBackgroundFlush() \ No newline at end of file