mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +00:00
Cancel all children if parent job is cancelled
This commit is contained in:
@@ -52,9 +52,11 @@ class DistributedJobManager:
|
|||||||
parent_id, hostname = render_job.parent.split('@')[0], render_job.parent.split('@')[-1]
|
parent_id, hostname = render_job.parent.split('@')[0], render_job.parent.split('@')[-1]
|
||||||
RenderServerProxy(hostname).notify_parent_of_status_change(parent_id=parent_id, subjob=render_job)
|
RenderServerProxy(hostname).notify_parent_of_status_change(parent_id=parent_id, subjob=render_job)
|
||||||
|
|
||||||
elif render_job.children and new_status == RenderStatus.CANCELLED:
|
# handle cancelling all the children
|
||||||
# todo: handle cancelling all the children
|
elif render_job.children and new_status in [RenderStatus.CANCELLED, RenderStatus.ERROR]:
|
||||||
pass
|
for child in render_job.children:
|
||||||
|
child_id, hostname = child.split('@')
|
||||||
|
RenderServerProxy(hostname).cancel_job(child_id, confirm=True)
|
||||||
|
|
||||||
# UI Notifications
|
# UI Notifications
|
||||||
if new_status == RenderStatus.COMPLETED:
|
if new_status == RenderStatus.COMPLETED:
|
||||||
|
|||||||
Reference in New Issue
Block a user