Skip to content
Snippets Groups Projects
Commit f58d4d11 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Add done() callback to agenda job

parent 93fd90ef
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
...@@ -6,7 +6,11 @@ const Agenda = require('agenda'); ...@@ -6,7 +6,11 @@ const Agenda = require('agenda');
const agenda = new Agenda({ const agenda = new Agenda({
db: { db: {
address: config.monq.uri, address: config.monq.uri,
collection: 'agendaJobs'} collection: 'agendaJobs'
},
maxConcurrency: 1,
defaultLockLimit: 0,
defaultLockLifetime: 86400*1000
}); });
require(`${libs}/jobs/download`)(agenda); require(`${libs}/jobs/download`)(agenda);
......
...@@ -31,6 +31,7 @@ module.exports = function(agenda) { ...@@ -31,6 +31,7 @@ module.exports = function(agenda) {
} }
console.log('MANDAR EMAIL'); console.log('MANDAR EMAIL');
console.log(body); console.log(body);
done();
}); });
}, (err) => { }, (err) => {
log.error('Error creating dump from DB'); log.error('Error creating dump from DB');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment