Fixed a few broken tests

This commit is contained in:
Isaac Abadi
2022-06-14 20:33:01 -04:00
parent 306da4ea63
commit f905d3c321
3 changed files with 72 additions and 26 deletions

View File

@@ -148,6 +148,7 @@ exports.updateTaskSchedule = async (task_key, schedule) => {
await db_api.updateRecord('tasks', {key: task_key}, {schedule: schedule});
if (TASKS[task_key]['job']) {
TASKS[task_key]['job'].cancel();
TASKS[task_key]['job'] = null;
}
if (schedule) {
TASKS[task_key]['job'] = scheduleJob(task_key, schedule);