bedrock-jobs
A job queue for Bedrock applications backed by Bull.
Usage
If multiple instances of the same Bedrock application are running on the same
Redis server, a unique prefix
should be assigned in each application's
Bedrock configuration. This is analogous to specifying a different database
for each application when using bedrock-mongodb
.
config.jobs.queueOptions.prefix = 'myApplicationPrefix';
API Reference
Modules
Typedefs
-
QueueOptions :
Object
-
Bull QueueOptions.
bedrock-jobs
Queue
bedrock-jobs.addQueue(options) ⇒ Creates a new Bull Queue that is persisted in Redis. Every time a queue with the same name is instantiated it tries to process all the old jobs that may exist from a previous unfinished session.
Kind: static method of bedrock-jobs
Returns: Queue
- A Bull Queue.
Param | Type | Default | Description |
---|---|---|---|
options | Object |
The options to use. | |
options.name | string |
The name for the queue. | |
[options.queueOptions] | QueueOptions |
{} |
The Bull QueueOptions. |
Object
QueueOptions : Bull QueueOptions.
Kind: global typedef
Link: https://github.com/OptimalBits/bull/blob/develop/REFERENCE.md#queue