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

task-chain

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

task-chain

task queue to process tesk one by one

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 03 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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