Skip to content

Commit

Permalink
Merge pull request #921 from UniversityOfHelsinkiCS/trunk
Browse files Browse the repository at this point in the history
remove active field from update task
  • Loading branch information
sasumaki authored May 22, 2019
2 parents dbf77a8 + 387a322 commit cb04379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/updater_scheduler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down Expand Up @@ -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')
})

})
Expand Down

0 comments on commit cb04379

Please sign in to comment.