This commit is contained in:
les 2021-04-10 00:20:42 +02:00
parent 2d34fd41a5
commit 945b33f8bf
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 6 additions and 2 deletions

View file

@ -86,6 +86,7 @@ const eventController = {
},
async get (req, res) {
log.error('get')
const format = req.params.format || 'json'
const is_admin = req.user && req.user.is_admin
const id = Number(req.params.event_id)
@ -97,7 +98,7 @@ const eventController = {
exclude: ['createdAt', 'updatedAt', 'placeId']
},
include: [
{ model: Tag, required: false, attributes: ['tag', 'weigth'], through: { attributes: [] } },
{ model: Tag, required: false, attributes: ['tag'], through: { attributes: [] } },
{ model: Place, attributes: ['name', 'address', 'id'] },
{
model: Resource,

View file

@ -99,7 +99,8 @@ const TS = new TaskManager()
TS.add(new Task({
name: 'CREATE_RECURRENT_EVENT',
method: eventController._createRecurrent,
repeatDelay: hour / 2 // check each half an hour
repeatDelay: hour / 2, // check each half an hour
repeat: true
}))
// remove unrelated places
@ -107,6 +108,7 @@ TS.add(new Task({
name: 'CLEAN_UNUSED_PLACES',
method: placeHelpers._cleanUnused,
repeatDelay: day,
repeat: true,
callAtStart: true
}))
@ -114,6 +116,7 @@ TS.add(new Task({
name: 'CLEAN_UNUSED_TAGS',
method: tagHelpers._cleanUnused,
repeatDelay: day,
repeat: true,
callAtStart: true
}))