mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 20:04:25 +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
|
, 10000
|
||||||
|
|
||||||
forceDrain = ->
|
forceDrain = ->
|
||||||
forceDrainMsDelay = parseInt(Settings.forceDrainMsDelay, 10)
|
logger.log {delay_ms:Settings.forceDrainMsDelay}, "starting force drain after timeout"
|
||||||
logger.log {delay_ms:forceDrainMsDelay}, "starting force drain after timeout"
|
|
||||||
setTimeout ()->
|
setTimeout ()->
|
||||||
logger.log "starting drain"
|
logger.log "starting drain"
|
||||||
DrainManager.startDrain(io, 4)
|
DrainManager.startDrain(io, 4)
|
||||||
, Settings.forceDrainMsDelay
|
, Settings.forceDrainMsDelay
|
||||||
|
|
||||||
if 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']
|
for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT']
|
||||||
logger.log signal: signal, "received interrupt, cleaning up"
|
|
||||||
process.on signal, ->
|
process.on signal, ->
|
||||||
|
logger.log signal: signal, "received interrupt, cleaning up"
|
||||||
shutdownCleanly(signal)
|
shutdownCleanly(signal)
|
||||||
forceDrain()
|
forceDrain()
|
||||||
|
|
Loading…
Reference in a new issue