mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 07:21:44 +00:00
log shutdown messages as warnings
This commit is contained in:
parent
a7ec454ed3
commit
1fc8cc44c3
1 changed files with 4 additions and 4 deletions
|
@ -111,17 +111,17 @@ Error.stackTraceLimit = 10
|
||||||
shutdownCleanly = (signal) ->
|
shutdownCleanly = (signal) ->
|
||||||
connectedClients = io.sockets.clients()?.length
|
connectedClients = io.sockets.clients()?.length
|
||||||
if connectedClients == 0
|
if connectedClients == 0
|
||||||
logger.log("no clients connected, exiting")
|
logger.warn("no clients connected, exiting")
|
||||||
process.exit()
|
process.exit()
|
||||||
else
|
else
|
||||||
logger.log {connectedClients}, "clients still connected, not shutting down yet"
|
logger.warn {connectedClients}, "clients still connected, not shutting down yet"
|
||||||
setTimeout () ->
|
setTimeout () ->
|
||||||
shutdownCleanly(signal)
|
shutdownCleanly(signal)
|
||||||
, 10000
|
, 30 * 1000
|
||||||
|
|
||||||
drainAndShutdown = (signal) ->
|
drainAndShutdown = (signal) ->
|
||||||
if Settings.shutDownInProgress
|
if Settings.shutDownInProgress
|
||||||
logger.log signal: signal, "shutdown already in progress, ignoring signal"
|
logger.warn signal: signal, "shutdown already in progress, ignoring signal"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
Settings.shutDownInProgress = true
|
Settings.shutDownInProgress = true
|
||||||
|
|
Loading…
Reference in a new issue