bedrock-jobs

3.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i bedrock-jobs

Weekly Downloads

2

Version

3.2.0

License

SEE LICENSE IN LICENSE.md

Unpacked Size

11.2 kB

Total Files

8

Last publish

Collaborators

  • davidlehn
  • msporny
  • dlongley
  • mattcollier