https://github.com/redibox/job
High performance, robust and flexible queue/worker system powered by redis.
https://github.com/redibox/job
job node node-redis nodejs queue redis
Last synced: 7 months ago
JSON representation
High performance, robust and flexible queue/worker system powered by redis.
- Host: GitHub
- URL: https://github.com/redibox/job
- Owner: redibox
- License: mit
- Created: 2016-04-27T22:47:00.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-06T11:17:34.000Z (about 9 years ago)
- Last Synced: 2025-06-12T08:43:01.336Z (8 months ago)
- Topics: job, node, node-redis, nodejs, queue, redis
- Language: JavaScript
- Homepage:
- Size: 135 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## RediBox Job
[](https://coveralls.io/github/redibox/job?branch=master)

[](https://www.npmjs.com/package/redibox-hook-job)
[](https://david-dm.org/redibox/job)
[](https://travis-ci.org/redibox/job)
[](/LICENSE)
The RediBox Job hook allows code to be run & distributed across many servers, whilst being highly configurable. Works well with the [Schedule](https://github.com/redibox/schedule) hook.
### Features
- Poll free design.
- Optional job TTL.
- Optional job retries.
- Optional job uniqueness.
- Queue rate limiting - X per X seconds.
- Standalone, Sentinel or Clustered Redis confgurations supported.
- Stalling prevention - gracefully resumes from shutdowns / crashes.
- Optional job statuses / progress sent via pubsub to the job creator.
- Flexible job runner functions - your functions can return a promise or just a synchronous result.
- Chain together jobs accross multiple queues and pass individual results onto the next job.
- Cancel the relay at any point on any of the jobs.
- Throttle stages of the relay by jumping to a throttled queue.
- Single queue job handler function or individual handlers per job using dot notated paths to global functions.
### Coming in v2
- Capped history lists of jobs.
- Queue stats (process times, average job waiting time etc).
- Job tagging. Tag a job and track it throughout it's lifetime.
- JSON API via [redibox/api](https://github.com/redibox/api).
- Responsive UI via [redibox/ui](https://github.com/redibox/ui).
- Delayed / scheduled jobs via [redibox/schedule](https://github.com/redibox/schedule) (v2).
### Installation
First ensure you have [RediBox](https://github.com/redibox/core) installed.
Install Job via npm/yarn:
`npm install redibox-hook-job --save`
`yarn add redibox-hook-job`
#### Usage
```javascript
RediBox.hooks.job.create('my-queue', {
runs: 'sails.hooks.myhook.runJobFoo', // dot notated path to a globally accessible function
data: {
foo: 'bar',
}
});
// With Sails hook
Job.create('my-queue', {
runs: 'sails.hooks.myhook.runJobBar', // dot notated path to a globally accessible function
data: {
foo: 'bar',
}
});
```
### Documentation
- [Getting Started](https://github.com/redibox/job/blob/master/docs/getting-started.md)
- [Queues](https://github.com/redibox/job/blob/master/docs/queues.md)
- [Creating Jobs](https://github.com/redibox/job/blob/master/docs/creating-jobs.md)
- [Advanced Usage](https://github.com/redibox/job/blob/master/docs/advanced-usage.md)
- [Best Practices](https://github.com/redibox/job/blob/master/docs/best-practices.md)
### License
MIT