diff options
author | eug-vs <eug-vs@keemail.me> | 2020-12-04 01:21:59 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-12-04 01:21:59 +0300 |
commit | 8ef929e503b00d93c5fee4ab996aeaa9abf283d3 (patch) | |
tree | 0aa142dce4a5d8dc4e90b090007cfbba3b4fc0fb /src | |
parent | a79e87296271a2891594a1ab11d746fdd875c928 (diff) | |
download | bsu-fantom-8ef929e503b00d93c5fee4ab996aeaa9abf283d3.tar.gz |
chore: upgrade mongo-cronjob
Diffstat (limited to 'src')
-rw-r--r-- | src/services/events/event.service.js | 1 | ||||
-rw-r--r-- | src/services/events/models.js | 11 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/services/events/event.service.js b/src/services/events/event.service.js index 2a15c96..45aebd3 100644 --- a/src/services/events/event.service.js +++ b/src/services/events/event.service.js @@ -11,5 +11,6 @@ module.exports = app => { const scheduler = new Scheduler(Model); scheduler.registerHandler('class', handleAttendClassJob); + scheduler.registerHandler('test', handleTestJob); }; diff --git a/src/services/events/models.js b/src/services/events/models.js index 99dada1..72b10d7 100644 --- a/src/services/events/models.js +++ b/src/services/events/models.js @@ -1,16 +1,7 @@ const mongoose = require('mongoose'); const { Client } = require('mongo-cronjob'); -const { getConnection } = require('../../connectDb.js'); - -const contextSchema = new mongoose.Schema({ - participants: [String], - attendanceId: String, - conferenceId: String -}); - -const connection = mongoose.connection; -const client = new Client(connection, contextSchema); +const client = new Client(mongoose.connection); module.exports = client; |