From b834049eeb65cb01bd9d0e17cf5037ce971efa1b Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 4 Dec 2018 14:33:25 +0000 Subject: [PATCH] improve delay ms logging --- services/real-time/app.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/real-time/app.coffee b/services/real-time/app.coffee index 17d2d5bcf9..8d4f8ecac7 100644 --- a/services/real-time/app.coffee +++ b/services/real-time/app.coffee @@ -96,17 +96,17 @@ shutdownCleanly = (signal) -> , 10000 forceDrain = -> - forceDrainMsDelay = parseInt(Settings.forceDrainMsDelay, 10) - logger.log {delay_ms:forceDrainMsDelay}, "starting force drain after timeout" + logger.log {delay_ms:Settings.forceDrainMsDelay}, "starting force drain after timeout" setTimeout ()-> logger.log "starting drain" DrainManager.startDrain(io, 4) , Settings.forceDrainMsDelay - + if Settings.forceDrainMsDelay? - logger.log "drainBeforeShutdown enabled" + Settings.forceDrainMsDelay = parseInt(Settings.forceDrainMsDelay, 10) + logger.log forceDrainMsDelay: Settings.forceDrainMsDelay,"forceDrainMsDelay enabled" for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT'] - logger.log signal: signal, "received interrupt, cleaning up" process.on signal, -> + logger.log signal: signal, "received interrupt, cleaning up" shutdownCleanly(signal) forceDrain()