0.1.21 • Published 3 years ago

@mmpro/ac-bootstrap-bull v0.1.21

Weekly downloads
14
License
MIT
Repository
github
Last release
3 years ago

AdmiralCloud Bull Queue List

This helper initialitzes Bull lists and helper functions and makes them available on a globally scoped variable.

Usage

const bullOptions = {
  activateListeners: true/false,
  worker: BatchProcessCollector, // optional module that has all worker functions available
  handlers: {
    'global:completed': BullHelper // optional module that reacts to global:completed events - functions in there must be named after the jobList name (e.g. sendEmail)
  },
  jobLists: [{
    jobList: 'sendEmail',
    enabled: true
  }, ...]
}

// acapi should be globally available throughout your app to access Bull functions
const acapi = {}
// make bull (and bull helper functions) available on acapi.bull
acapi.bull = acbBull(acapi)
// init the bull lists
acapi.bull.init(bullOptions, done)

Also make sure to initialize redis-lock (https://github.com/mmpro/ac-redislock) in your application:

redisLock.init({
  redis: acapi.redis.acEvents, // redis server instance
  logger: acapi.log, // logger instance (winston)
  logLevel: 'silly'
})

TBC

0.1.21

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.14

3 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.0

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago