Skip to content

Commit 35a7a5f

Browse files
committed
fix: complete the demo
1 parent 05c1129 commit 35a7a5f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

demo/basic.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ runner.postTask({
3030
onResolve: (result) => {
3131
console.log(result);
3232
},
33+
onReject: (errorReason) => {
34+
console.error(errorReason);
35+
},
3336
})
3437

3538
runner.postTask({
@@ -39,4 +42,7 @@ runner.postTask({
3942
onResolve: (result) => {
4043
console.log(result);
4144
},
45+
onReject: (errorReason) => {
46+
console.error(errorReason);
47+
},
4248
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "priority-worker-runner",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Priority queue based task execution queue",
55
"main": "build/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)