The RediBox Job hook allows code to be run & distributed across many servers, whilst being highly configurable. Works well with the Schedule hook.
- 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.
- 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.
- Responsive UI via redibox/ui.
- Delayed / scheduled jobs via redibox/schedule (v2).
First ensure you have RediBox installed.
Install Job via npm/yarn:
npm install redibox-hook-job --save
yarn add redibox-hook-job
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',
}
});
MIT