@abtnode/queue 1.6.8 → 1.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +0 -1
- package/lib/store.js +2 -2
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -80,7 +80,6 @@ module.exports = function createQueue({ file, onJob, options = {} }) {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
const id = jobId || (typeof options.id === 'function' ? options.id(job) : uuid.v4()) || uuid.v4();
|
|
83
|
-
|
|
84
83
|
// eslint-disable-next-line no-shadow
|
|
85
84
|
const clearJob = (id) => {
|
|
86
85
|
store.deleteJob(id, (e) => {
|
package/lib/store.js
CHANGED
|
@@ -17,9 +17,9 @@ class JobStore {
|
|
|
17
17
|
|
|
18
18
|
isCancelled(id) {
|
|
19
19
|
return new Promise((resolve, reject) => {
|
|
20
|
-
this.db.findOne({ _id: id }, (e,
|
|
20
|
+
this.db.findOne({ _id: id }, (e, job) => {
|
|
21
21
|
if (e) return reject(e);
|
|
22
|
-
return resolve(!!
|
|
22
|
+
return resolve(!!job && !!job.cancelled);
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.12",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/util": "1.6.
|
|
22
|
+
"@abtnode/util": "1.6.12",
|
|
23
23
|
"@nedb/core": "^1.2.2",
|
|
24
24
|
"@nedb/multi": "^1.2.2",
|
|
25
25
|
"debug": "^4.3.3",
|
|
26
26
|
"fastq": "^1.8.0",
|
|
27
27
|
"uuid": "7.0.3"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "dd79037978dc12f72330227a553a80a504f03fa7",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"jest": "^27.4.5"
|
|
32
32
|
}
|