ek

egg-kue

A priority job queue backed by redis, built for eggjs.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

11

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

egg-kue

NPM version

A priority job queue backed by redis, built for eggjs.

Install

$ npm i egg-kue --save

Usage

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

Configuration

// {app_root}/config/config.default.js
'use strict';
exports.kue = {
  app : true,
  agent : false,
  client: {
    queuePrefix: 'q',
    redis: {
      port: 6379,
      host: '127.0.0.1',
      auth: '',
      db: 3,
      // see https://github.com/mranney/node_redis#rediscreateclient
      options: {
      },
    },
  },
  // clients: {}
};

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

Example

app.kue.process('email', (job, done) => {
  // send email for this;
  email(job.data.to, done);
});

app.kue.create('email', {
    title: 'welcome email for justin'
  , to: 'gdjyluxiaoyong@gmail.com'
  , template: 'welcome-email'
}).save();

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial