Bull: migration guide from kue

Created on 12 Sep 2018  路  3Comments  路  Source: OptimalBits/bull

it would be very helpful to add a migration guide from kue to bull

BETTER DOC PR REQUEST

Most helpful comment

kue example

import kue from 'kue';

const queue = kue.createQueue({
  redis: process.env.REDIS_HOST,
});

const jobHandler = (job, done) => {
   const { data } = job;

   done();
}

queue.process('name', 1, jobHandler);

// calling a job
queue.create('name', params);

bull example

import Queue, { Job } from 'bull';

const queue = new Queue('DEFAULT', process.env.REDIS_HOST);

const jobHandler = (job) => {
   const { data } = job;
}

queue.process('name', jobHandler)

// calling a job
queue.add('name', payload, params)

All 3 comments

any news for this migration?

kue example

import kue from 'kue';

const queue = kue.createQueue({
  redis: process.env.REDIS_HOST,
});

const jobHandler = (job, done) => {
   const { data } = job;

   done();
}

queue.process('name', 1, jobHandler);

// calling a job
queue.create('name', params);

bull example

import Queue, { Job } from 'bull';

const queue = new Queue('DEFAULT', process.env.REDIS_HOST);

const jobHandler = (job) => {
   const { data } = job;
}

queue.process('name', jobHandler)

// calling a job
queue.add('name', payload, params)

How to set priority for both kue and bull

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pintocarlos picture pintocarlos  路  3Comments

NicolasDuran picture NicolasDuran  路  4Comments

chocof picture chocof  路  3Comments

DevBrent picture DevBrent  路  4Comments

JSRossiter picture JSRossiter  路  3Comments