Skip to content

TaskQueue.js is a JavaScript task queue management library for client and server side development.

License

Notifications You must be signed in to change notification settings

gjivaros/TaskQueue.js

Repository files navigation

TaskQueue.js

TaskQueue.js is a JavaScript task queue management library for client and server side development.

Table of Contents

Installation

You can install TaskQueue.js using npm :

npm install taskqueue.js

Use

To use TaskQueue.js, you just need to import the library and create an instance of the task queue :

import TaskQueue from "taskqueue.js";

const taskQueue = new TaskQueue();

You can then add tasks to the queue:

taskQueue.push(() => console.log("Task1");
taskQueue.push(() => console.log("Task2");

// Add a task with arguments
taskQueue.push((arg1:string, arg2:string) => console.log(arg1,arg2), arg1, arg2);

You can run the tasks in sequence using the run() method:

await taskQueue.run()

TaskQueue.js also handles errors and automatic task repetition in case of failure.

Contribute

Contributions to TaskQueue.js are welcome! To contribute, please fork this repository, make your changes and submit a pull request.

cp .vscode/settings.example.json .vscode/settings.json
npm i

License

TaskQueue.js is licensed under the MIT license. See the LICENSE file for more details.

Contact

Created by Jivaros GBETO - Twitter | LinkedIn | jivarosgbeto@gmail.com - feel free to contact me!

About

TaskQueue.js is a JavaScript task queue management library for client and server side development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published