mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug with re-enabling a task
This commit is contained in:
parent
e63966e7e6
commit
5fc2f06274
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user