Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-delayed-job

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-delayed-job

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

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

egg-delayed-job

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

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

Install

$ npm i egg-delayed-job --save

Usage

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

Configuration

// {app_root}/config/config.default.js
'use strict';
exports.delayedJob = {
  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.delayedJob.process('email', (job, done) => {
  // send email for this;
  email(job.data.to, done);
});

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

form more config please see here

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 15 Jul 2017

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