write tasks inside of workers

This commit is contained in:
ansuz
2020-04-16 16:37:24 -04:00
parent ba6faca02e
commit 4e57e390da
4 changed files with 15 additions and 7 deletions

View File

@@ -31,7 +31,6 @@ module.exports.create = function (config, cb) {
// and more easily share state between historyKeeper and rpc
const Env = {
Log: Log,
// tasks
// store
id: Crypto.randomBytes(8).toString('hex'),
@@ -261,11 +260,6 @@ module.exports.create = function (config, cb) {
}
}));
}).nThen(function (w) {
// create a task store (for scheduling tasks)
require("./storage/tasks").create(config, w(function (e, tasks) {
if (e) { throw e; }
Env.tasks = tasks;
}));
if (config.disableIntegratedTasks) { return; }
config.intervals = config.intervals || {};