define all server intervals in a map so we can easily clear them all
This commit is contained in:
@@ -13,6 +13,7 @@ module.exports.create = function (config) {
|
||||
config.store = _store;
|
||||
}));
|
||||
}).nThen(function (w) {
|
||||
// XXX embed this in historyKeeper
|
||||
require("../storage/tasks").create(config, w(function (e, tasks) {
|
||||
if (e) {
|
||||
throw e;
|
||||
@@ -20,8 +21,8 @@ module.exports.create = function (config) {
|
||||
config.tasks = tasks;
|
||||
if (config.disableIntegratedTasks) { return; }
|
||||
|
||||
// XXX support stopping this interval
|
||||
setInterval(function () {
|
||||
config.intervals = config.intervals || {};
|
||||
config.intervals.taskExpiration = setInterval(function () {
|
||||
tasks.runAll(function (err) {
|
||||
if (err) {
|
||||
// either TASK_CONCURRENCY or an error with tasks.list
|
||||
|
||||
Reference in New Issue
Block a user