Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/goliatone/simple-task-manager

Simple task scheduler and manager
https://github.com/goliatone/simple-task-manager

Last synced: 4 days ago
JSON representation

Simple task scheduler and manager

Awesome Lists containing this project

README

        

## Simple Task Manager

This is a sample project. To get started:

```
$ npm i simple-task-manager
```

* Task
* Scheduler
* Manager
* Worker

How to handle multiple workers for a single queue in distributed machines/processes?
Claim a task

We schedule a task to run.
Execute task, increase run count when done.

- [ ] A task can be scheduled to be run immediately
- `ttl === 0`
- [ ] A task can be scheduled to be run at a later date
- `ttl > 0`
- [ ] A task can be run once
- `maxRuns === 0`
- [ ] A task can be run multiple times
- [ ] `maxRuns > 0`

- [ ] After an error a task can be retried if:
- [ ] We have not gone over our tries `maxTries < errorCount`
- [ ] A task can be assigned a timeout period to run
- `timeout`

- [ ] A task should have a timeout for execution time

- [ ] If we start queue and worker exits the task will not be picked up by worker. We need to be able to pick up timedout tasks and requeue them, using scheduler.

## TODO

- [ ] Merge with [simple-session-manager](https://github.com/goliatone/simple-session-manage) as it has many of the same components.

## License
® License MIT by goliatone