Skip to content

A drop-in replacement for Kue with Amazon SQS backend

Notifications You must be signed in to change notification settings

cfjtech/sqs-taskqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQS Task Queue

Build Status Code Climate Test Coverage

Are you using Kue with Redis backend?

This a quick way to replace Kue with Amazon SQS backend.

Instead of:

var kue = require('kue'),
	queue = kue.createQueue();

Do like this:

var AWS = require('aws-sdk')
var sqs = new AWS.SQS({
  region: '',
  accessKeyId: '',
  secretAccessKey: ''
})

var SQSWorker = require('sqs-taskqueue'),
  queue = new SQSWorker(
    sqs,
    'https://sqs.ap-northeast-1.amazonaws.com/XXXXXXXXXX/',
    'yourapp'
  );

The rest they are the same!!!

For example:

var job = queue.create('email', {
    title: 'welcome email for tj'
  , to: 'dummy@google.com'
  , template: 'welcome-email'
}).save( function(err){
   if( !err ) console.log( job.id );
});

About

A drop-in replacement for Kue with Amazon SQS backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published