Skip to content

digitalbazaar/bedrock-jobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

bedrock-jobs

Typedefs

QueueOptions : Object

Bull QueueOptions.

bedrock-jobs

bedrock-jobs.addQueue(options) ⇒ Queue

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.

QueueOptions : Object

Bull QueueOptions.

Kind: global typedef
Link: https://github.com/OptimalBits/bull/blob/develop/REFERENCE.md#queue