blob: 2a15c96d0dca2ccb3689cd8e35fefe26df975b01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const { Scheduler } = require('mongo-cronjob');
const service = require('feathers-mongoose');
const handleAttendClassJob = require('../../handlers');
const Model = require('./models.js').Event;
const handleTestJob = () => new Promise(res => setTimeout(res, 10000));
module.exports = app => {
app.use('/events', service({ Model }));
const scheduler = new Scheduler(Model);
scheduler.registerHandler('class', handleAttendClassJob);
};
|