mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 19:02:20 +00:00
improve delay ms logging
This commit is contained in:
parent
05611de15e
commit
b834049eeb
1 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue