From 387a3225395a3ded8267983e2796b9ae054d9cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A4kinen=20Sasu=20S?= Date: Wed, 22 May 2019 15:36:24 +0300 Subject: [PATCH] remove active field from update task --- services/updater_scheduler/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/updater_scheduler/index.js b/services/updater_scheduler/index.js index 6a3ee65692..5cfc4be990 100644 --- a/services/updater_scheduler/index.js +++ b/services/updater_scheduler/index.js @@ -14,7 +14,7 @@ const TIMEZONE = 'Europe/Helsinki' const updateTask = async (task, status, type) => { if (type) { - await Schedule.findOneAndUpdate({ task }, { task, status, updatedAt: new Date(), type, active }, { upsert: true }) + await Schedule.findOneAndUpdate({ task }, { task, status, updatedAt: new Date(), type }, { upsert: true }) } else { await Schedule.findOneAndUpdate({ task }, { task, status, updatedAt: new Date(), type: 'other', active: true }, { upsert: true }) @@ -97,7 +97,7 @@ stan.on('connect', async () => { } return false } - await updateTask(message[0], message[1], !!isValidStudentId(message[0]) ? 'student' : 'other') + await updateTask(taskmessage[0], message[1], !!isValidStudentId(message[0]) ? 'student' : 'other') }) })