Skip to content

Instantly share code, notes, and snippets.

@sharat
Created April 21, 2017 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharat/8bc3aaecb1129b70560770f960987c9b to your computer and use it in GitHub Desktop.
Save sharat/8bc3aaecb1129b70560770f960987c9b to your computer and use it in GitHub Desktop.
Lists all jobs in Kue
require('dotenv').config()
var kue = require('kue');
console.info('Creating Queue with redis', process.env.REDISCLOUD_URL);
var queue = kue.createQueue({
redis: process.env.REDISCLOUD_URL
})
console.log('moving forward with kue')
queue.active( function( err, ids ) {
ids.forEach( function( id ) {
kue.Job.get( id, function( err, job ) {
console.log(job)
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment