mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug where nested reaction tasks would stack
This commit is contained in:
parent
af10353119
commit
9ebdbbf5af
@ -541,6 +541,9 @@ class TasksManager:
|
||||
|
||||
def schedule_watcher(self, event):
|
||||
if not event.exception:
|
||||
task = self.controller.management.get_scheduled_task_model(
|
||||
int(event.job_id)
|
||||
)
|
||||
if str(event.job_id).isnumeric():
|
||||
task = self.controller.management.get_scheduled_task_model(
|
||||
int(event.job_id)
|
||||
@ -556,7 +559,7 @@ class TasksManager:
|
||||
if task.one_time:
|
||||
self.remove_job(task.schedule_id)
|
||||
logger.info("one time task detected. Deleting...")
|
||||
else:
|
||||
elif task.interval_type != "reaction":
|
||||
self.controller.management.update_scheduled_task(
|
||||
task.schedule_id,
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user