mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
remove randomisation to avoid shutdown problems
This commit is contained in:
parent
bb2dbeaa6e
commit
d2af7b24a0
1 changed files with 3 additions and 6 deletions
|
@ -56,12 +56,9 @@ updateMemoryStats = (oldMem, newMem) ->
|
|||
|
||||
module.exports = MemoryMonitor =
|
||||
monitor: (logger) ->
|
||||
# use setTimeout add some randomisation of the start time
|
||||
setTimeout () ->
|
||||
interval = setInterval () ->
|
||||
MemoryMonitor.Check(logger)
|
||||
, oneMinute
|
||||
, Math.floor Math.random()*oneMinute
|
||||
interval = setInterval () ->
|
||||
MemoryMonitor.Check(logger)
|
||||
, oneMinute
|
||||
Metrics = require "./metrics"
|
||||
Metrics.registerDestructor () ->
|
||||
clearInterval(interval)
|
||||
|
|
Loading…
Reference in a new issue