Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

task-chain

jessechen3ISC1.0.1

task queue to process tesk one by one

readme

task-chain

this is project is about running tasks one by one.

for eack banch of tasks, you need to create a task runner:

let chainTaskRunner = new ChainTaskRunner();

after that, you can push your task to the task runner:

let chainTask1 = new ChainTask(()->{ setTimeout(function(){chainTask1.end()}, 2000) });

chainTaskRunner.addTask(chainTask1);

but in your processer or your task, you need to call

yourTask.end()

to end the task, if you donot end the task manually, the task will keep running~!

for more detail, you can refer to example: ChainTaskTester.js

GITHUB: https://github.com/jessechen0319/task-chain