@mmpro/ac-bootstrap-bull
Bull helper
Last updated 3 days ago by mmpro .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @mmpro/ac-bootstrap-bull 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.8                                ...           latest (3 days ago)

14 Versions

  • 0.1.8                                ...           3 days ago
  • 0.1.7                                ...           11 days ago
  • 0.1.6                                ...           12 days ago
  • 0.1.5                                ...           25 days ago
  • 0.1.4                                ...           25 days ago
  • 0.1.3                                ...           25 days ago
  • 0.1.2                                ...           25 days ago
  • 0.1.0                                ...           25 days ago
  • 0.0.7                                ...           2 months ago
  • 0.0.6                                ...           3 months ago
  • 0.0.5                                ...           3 months ago
  • 0.0.4                                ...           3 months ago
  • 0.0.3                                ...           3 months ago
  • 0.0.2                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 9
Last Month 79
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |