summaryrefslogtreecommitdiff
path: root/src/services/events/event.service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/events/event.service.js')
-rw-r--r--src/services/events/event.service.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/events/event.service.js b/src/services/events/event.service.js
index accd45d..267016f 100644
--- a/src/services/events/event.service.js
+++ b/src/services/events/event.service.js
@@ -18,6 +18,12 @@ class Events {
// Define jobs
this.agenda.define('attend class', handleAttendClassJob);
+
+ // Logs
+ this.agenda.on('start', job => console.log(`Starting ${job.attrs.name} job`));
+ this.agenda.on('complete', job => console.log(`Job ${job.attrs.name} finished`));
+ this.agenda.on('fail', (job, err) => console.log(`Job failed with the error ${err}`));
+
return this.agenda.start();
};