Comparing version 1.0.2 to 1.0.3
module.exports = { | ||
TASK_ADD: "task:add", | ||
TASK_REMOVE: "task:remove", | ||
TASK_COMPLETE: "task:complete", | ||
WORKER_CREATE: "worker:create", | ||
WORKER_REMOVE: "worker:remove" | ||
TASK_ADD: 'task:add', | ||
TASK_ERROR: 'task:error', | ||
TASK_REMOVE: 'task:remove', | ||
TASK_COMPLETE: 'task:complete', | ||
WORKER_CREATE: 'worker:create', | ||
WORKER_REMOVE: 'worker:remove', | ||
}; |
@@ -124,3 +124,3 @@ const uuid = require('uuid'); | ||
worker.onChildMessage(this.handleChildMessage(worker)); | ||
// worker.onWorkerMessage(this.handleWorkerMessage(worker)); | ||
worker.onWorkerMessage(this.handleWorkerMessage(worker)); | ||
debug( | ||
@@ -143,7 +143,10 @@ `New Worker created, previous worker count ${this._workerTaskLookup.size}` | ||
taskId, | ||
data: { message: 'Worker stopped suddenly.' }, | ||
type: events.TASK_ERROR, | ||
data: { | ||
message: 'Our worker stopped suddenly, please try again.', | ||
}, | ||
}); | ||
}); | ||
const worker = this._createWorker(worker.getType()); | ||
this._workerTaskLookup.set(data.workerId, []); | ||
const newWorker = this._createWorker(worker.getType()); | ||
this._workerTaskLookup.set(newWorker.getId(), []); | ||
this.removeWorker(data.workerId); | ||
@@ -158,3 +161,8 @@ break; | ||
taskId, | ||
data: { message: `Sudden ${data.eventType} of worker` }, | ||
type: events.TASK_ERROR, | ||
data: { | ||
message: `Sudden ${ | ||
data.eventType | ||
} of our worker caused your task to be failed, please try again.`, | ||
}, | ||
}); | ||
@@ -161,0 +169,0 @@ }); |
{ | ||
"name": "thekdar", | ||
"version": "1.0.2", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/jest tests", | ||
"test:watch": "npm run test -- --watch" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"debug": "^3.1.0", | ||
"respawn": "^2.5.0", | ||
"uuid": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"get-port": "^3.2.0", | ||
"jest": "^22.0.4" | ||
} | ||
"name": "thekdar", | ||
"version": "1.0.3", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/jest tests", | ||
"test:watch": "npm run test -- --watch" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"debug": "^3.1.0", | ||
"respawn": "^2.5.0", | ||
"uuid": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"get-port": "^3.2.0", | ||
"jest": "^22.0.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18404
541