New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

egg-queue-bull

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-queue-bull

Provide job queue for egg, powered by Bull

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

egg-queue-bull

NPM version build status Test coverage

Provide job queue for egg, powered by Bull

Install

$ npm i egg-queue-bull --save

Usage

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

Configuration

// {app_root}/config/config.default.js
exports.queue = {
  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`
};

exports.bull = {
  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.js
module.exports = app => {
  const queue = app.bull.get('videoQueue');

  queue.process((job, done) => {
    job.progress(42);
    done();
  });

  return queue;
};

// {app_root}/app/controller/video.js
exports.index = function* (ctx) {
  yield ctx.queue.video.add({ video: 'http://example.com/video1.mov' });
};

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 28 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc