egg-queue-bull
Provide job queue for egg, powered by Bull
Install
$ npm i egg-queue-bull --save
Usage
// {app_root}/config/plugin.jsexportsqueue = enable: true package: 'egg-queue-bull';
Configuration
// {app_root}/config/config.default.jsexportsqueue = delegate: 'queue' // load all queues to `app[delegate]` and `ctx[delegate]`, default to `queue` baseDir: 'queue' // load all files in `app/${baseDir}` as queues, default to `queue`; exportsbull = clients: q1: name: 'q1' q2: name: 'q2' default: redis: port: 6379 host: '127.0.0.1' ;
Please see Bull for more detail.
Example
// {app_root}/app/queue/video.jsmodule { const queue = appbull; queue; return queue;}; // {app_root}/app/controller/video.jsexports { ctxqueuevideo;};
Questions & Suggestions
Please open an issue here.