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

moleculer-queues

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moleculer-queues

Task queue mixin using bull

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-87.88%
Maintainers
1
Weekly downloads
 
Created
Source

Moleculer logo

moleculer-queues NPM version

Redis-based queue for Node using Bull.

Installation

Install my-project with npm

npm install moleculer-bull --save

or

yarn add moleculer-bull

Usage/Examples

const MoleculerQueues = require('moleculer-queues');

broker.createService({
  name: 'service-example',
  //Default redis is "localhost"
  mixins: [MoleculerQueues('PrefixName', { redis: 'redis://127.0.0.1:6379' })],
  methods: {
    yourMethod(payload) {
      //Some logic...

      this.addJobQueue('SendEmail', {
        //Your playload data..
      });
    },
  },
  queues: [
    {
      name: 'SendEmail',
      async handler(job, done) {
        this.logger.info('Sending notification..');

        //Some logic...

        return done(null, {
          message: 'Notification sent!',
        });
      },
    },
  ],
});

To-do

  • Unit Testing
  • Real Example

Keywords

FAQs

Package last updated on 15 Mar 2022

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