Fix bug with re-enabling a task

This commit is contained in:
Andrew 2022-01-11 19:30:00 -05:00
parent e63966e7e6
commit 5fc2f06274

View File

@ -207,8 +207,10 @@ class TasksManager:
def update_job(self, sch_id, job_data):
management_helper.update_scheduled_task(sch_id, job_data)
if job_data['enabled']:
try:
self.scheduler.remove_job(str(sch_id))
except:
logger.info("No job found in update job. Assuming it was previously disabled. Starting new job.")
if job_data['cron_string'] != "":
cron = job_data['cron_string'].split(' ')
try: