improve worker logging and move blob deletion to worker processes as well
This commit is contained in:
@@ -10,6 +10,7 @@ const Core = require("./commands/core");
|
||||
|
||||
const Store = require("./storage/file");
|
||||
const BlobStore = require("./storage/blob");
|
||||
const Workers = require("./workers/index");
|
||||
|
||||
module.exports.create = function (config, cb) {
|
||||
const Log = config.log;
|
||||
@@ -78,8 +79,6 @@ module.exports.create = function (config, cb) {
|
||||
domain: config.domain
|
||||
};
|
||||
|
||||
HK.initializeValidationWorkers(Env);
|
||||
|
||||
(function () {
|
||||
var pes = config.premiumUploadSize;
|
||||
if (!isNaN(pes) && pes >= Env.maxUploadSize) {
|
||||
@@ -243,7 +242,7 @@ module.exports.create = function (config, cb) {
|
||||
Env.blobStore = blob;
|
||||
}));
|
||||
}).nThen(function (w) {
|
||||
HK.initializeIndexWorkers(Env, {
|
||||
Workers.initialize(Env, {
|
||||
blobPath: config.blobPath,
|
||||
blobStagingPath: config.blobStagingPath,
|
||||
pinPath: pinPath,
|
||||
@@ -268,6 +267,7 @@ module.exports.create = function (config, cb) {
|
||||
if (config.disableIntegratedTasks) { return; }
|
||||
|
||||
config.intervals = config.intervals || {};
|
||||
// XXX
|
||||
config.intervals.taskExpiration = setInterval(function () {
|
||||
tasks.runAll(function (err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user