resque-enqueue-activejob
v1.0.0
Published
enqueue tasks to ActiveJob resque from node
Downloads
2
Readme
resque-enqueue-activejob
Enqueues tasks to resque 1.x.x, specifically for the ActiveJob
wrapper. Does not attempt to do anything else. redis
should be something like node-redis
that has sadd
and rpush
with a callback API.
Based on the original package for bare resque: resque-enqueue.
var enqueue = require('resque-enqueue-activejob');
enqueue(redis, 'normal', 'SendWelcome', '[email protected]', function(err) {
if(!err) {
console.log("mail sent!");
}
});
API
Enqueue
enqueue(redis, queue, className, args..., cb)
// or
enqueue.enqueue(redis, queue, className, args..., cb)
Enqueues a single task to resque.
Set Namespace
enqueue.setNamespace(namespace)
Sets the namespace, defaults to resque
.