pm2 / cron worker to send reminder

This commit is contained in:
lesion
2019-03-10 01:01:23 +01:00
parent e41de7208c
commit 6ed639d94b
39 changed files with 264 additions and 105 deletions

View File

@@ -1,5 +1,5 @@
const { Event, Comment, Tag, Place } = require('../model')
const Sequelize = require('sequelize')
const { Op } = require('sequelize')
const config = require('../config')
const moment = require('moment')
const ics = require('ics')
@@ -21,7 +21,7 @@ const exportController = {
}
const events = await Event.findAll({
order: [['start_datetime', 'ASC']],
where: { start_datetime: { [Sequelize.Op.gte]: yesterday } },
where: { start_datetime: { [Op.gte]: yesterday } },
include: [Comment, {
model: Tag,
where: whereTag