Skip to content

articulate/squiss-jobs

Repository files navigation

squiss-jobs npm version npm version

SQS-backed job queue.

Quick start guide

// 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' })

v1 docs

For v0 docs, see the original API.