SQS-backed job queue.
// instantiate your queue
const queue = require('squiss-jobs')({
queueUrl: process.env.JOBS_URI,
region: process.env.AWS_REGION
})
// create a job handler
const foo = payload =>
Promise.resolve(payload)
.then(/* do something useful */)
// register the job
queue.handle('foo', foo)
// start processing jobs
queue.start()
// send a job onto the queue
queue.send('foo', { bar: 'baz' })
For v0
docs, see the original API.