Skip to content

Commit

Permalink
🐞 Trustees struggle to respond to director (#96)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#402
  • Loading branch information
Findeton authored Apr 23, 2024
1 parent 44c6d2a commit 46b9d48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frestq/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ def __init__(self, label=""):
def _create_from_model(cls, task_model):
ret = cls()
ret.task_model = task_model
ret.send_update_to_sender = not task_model.is_local
ret._init_from_model()
return ret

Expand Down Expand Up @@ -1322,10 +1323,13 @@ def post_task(msg, action_handler):
if task.action_handler_object:
try:
task.action_handler_object.handle_error(e)
except:
except Exception as ee:
task.propagate = True
print("exception arised when handling previous exception")
print(ee)
print("after error handler task(%s).propagate(%s)" % (task_model.id, task.propagate))


if task_output:
update_task(task, task_output)

Expand All @@ -1336,6 +1340,7 @@ def post_task(msg, action_handler):
db.session.commit()

if task.send_update_to_sender:
print("sending update to sender for task(%s)" % (task_model.id))
sched = FScheduler.get_scheduler(INTERNAL_SCHEDULER_NAME)
sched.add_now_job(send_task_update, [task_model.id])

Expand Down

0 comments on commit 46b9d48

Please sign in to comment.