Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

thekdar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thekdar - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

11

core/events.js
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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc