Skip to content

Commit

Permalink
Merge pull request #14 from cmseaton42/add-task-easy
Browse files Browse the repository at this point in the history
Remove queue utility class and replace with task-easy package
  • Loading branch information
cmseaton42 authored Apr 16, 2018
2 parents b79d6ab + 4aca4dc commit cd59835
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 566 deletions.
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethernet-ip",
"version": "1.1.4",
"version": "1.1.5",
"description": "A simple node interface for Ethernet/IP.",
"main": "./src/index.js",
"scripts": {
Expand Down Expand Up @@ -28,7 +28,8 @@
"controller"
],
"dependencies": {
"dateformat": "^3.0.3"
"dateformat": "^3.0.3",
"task-easy": "^0.2.0"
},
"devDependencies": {
"colors": "^1.2.0",
Expand Down
9 changes: 5 additions & 4 deletions src/controller/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const { ENIP, CIP } = require("../enip");
const dateFormat = require("dateformat");
const TagGroup = require("../tag-group");
const { delay, promiseTimeout, TaskQueue } = require("../utilities");
const { delay, promiseTimeout } = require("../utilities");
const Queue = require("task-easy");

const compare = (obj1, obj2) => {
if (obj1.priority > obj2.priority) return true;
Expand Down Expand Up @@ -36,9 +37,9 @@ class Controller extends ENIP {
};

this.workers = {
read: new TaskQueue(compare),
write: new TaskQueue(compare),
group: new TaskQueue(compare)
read: new Queue(compare),
write: new Queue(compare),
group: new Queue(compare)
};
}

Expand Down
281 changes: 0 additions & 281 deletions src/utilities/__snapshots__/utilities.spec.js.snap

This file was deleted.

Loading

0 comments on commit cd59835

Please sign in to comment.