remove randomisation to avoid shutdown problems

This commit is contained in:
Brian Gough 2015-08-17 15:18:18 +01:00
parent bb2dbeaa6e
commit d2af7b24a0

View file

@ -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)