Skip to content

OptimalBits/resultqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resultqueue

Result queue on top of bull

const {
  Client,
  Server
} = require('../');

const redis = {
  host: 'localhost',
  port: '6379'
};

const server = new Server('test-queue', redis);
const client = new Client('test-queue', 'id', redis);

server.processJob(data => {
  console.log('Sever processing job', data);
  
  return {val: data.val + 1};
});

client.processResult(result => {
  console.log('Client got result', result);

  // free resources
  client.destroy();
  server.destroy();
});

const input = {val: 1};
console.log('Adding job', input);
client.addJob(input);

About

Result queue on top of bull

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published