mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
use delayExitUntilDrained
This commit is contained in:
parent
8073cdea75
commit
2418e5db57
2 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
Metrics = require("metrics-sharelatex")
|
||||
Settings = require "settings-sharelatex"
|
||||
Metrics.initialize(Settings.appName or "real-time")
|
||||
|
||||
logger = require "logger-sharelatex"
|
||||
|
@ -8,7 +9,6 @@ Metrics.event_loop.monitor(logger)
|
|||
express = require("express")
|
||||
session = require("express-session")
|
||||
redis = require("redis-sharelatex")
|
||||
Settings = require "settings-sharelatex"
|
||||
if Settings.sentry?.dsn?
|
||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
||||
|
||||
|
@ -104,7 +104,7 @@ forceDrain = ->
|
|||
, THREE_HOURS
|
||||
|
||||
|
||||
if Settings.drainBeforeShutdown
|
||||
if Settings.delayExitUntilDrained
|
||||
logger.log "drainBeforeShutdown enabled"
|
||||
for signal in ['SIGINT', 'SIGHUP', 'SIGQUIT', 'SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGABRT']
|
||||
logger.log signal: signal, "received interrupt, cleaning up"
|
||||
|
|
|
@ -42,4 +42,4 @@ module.exports =
|
|||
|
||||
max_doc_length: 2 * 1024 * 1024 # 2mb
|
||||
|
||||
drainBeforeShutdown: process.env['DRAIN_BEFORE_SHUTDOWN'] or false
|
||||
delayExitUntilDrained: process.env['DELAY_EXIT_UNTIL_DRAINED'] or false
|
Loading…
Reference in a new issue