egg-bull

1.0.0 • Public • Published

egg-bull

NPM version build status Test coverage David deps Known Vulnerabilities npm download

bull plugin for egg framework

Install

$ npm i egg-bull --save

Usage

// {app_root}/config/plugin.js
exports.bull = {
  enable: true,
  package: 'egg-bull',
};

Configuration

// {app_root}/config/config.unittest.js
exports.bull = {
   default: {
      redis: {
        host: '127.0.0.1',
        port: 6379,
      }
    },
    clients: {
      TestQueue: {topic: 'test'},
    },
    app: true,
    agent: false
};

see config/config.unittest.js for more detail.

Example

   app.bull.get('TestQueue').add({ message: 'hi bull' });
   app.bull.get('TestQueue').process(function(job) {
      assert(job.data.message === 'hi bull');
      done();
    });
 

see bull home page for more details

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i egg-bull

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • yuansc