Last active
August 29, 2015 14:10
-
-
Save IgorDePaula/17b933cf76cad71d699c to your computer and use it in GitHub Desktop.
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
var kue = require('kue') | |
, jobs = kue.createQueue(); | |
var spawn = require('child_process').spawn; | |
kue.app.listen(3000); //painel de acompanhamento do kue | |
var job = jobs.create('create slide', { | |
file: './lib/novo12.ppt', | |
title: 'create slide teste' | |
}) | |
.save(function (err) { | |
if (!err) | |
console.log(job.id); | |
}); | |
job.on('complete', function (result) { | |
console.log("Job completed with data ", result); | |
}) | |
.on('failed', function () { | |
console.log("Job failed"); | |
}) | |
.on('progress', function (progress) { | |
process.stdout.write('\r job #' + job.id + ' ' + progress + '% complete'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment