Created
April 21, 2017 06:15
-
-
Save sharat/8bc3aaecb1129b70560770f960987c9b to your computer and use it in GitHub Desktop.
Lists all jobs in Kue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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