Allow to continue running from previous execution iteration

This commit is contained in:
allegroai 2021-03-18 09:48:47 +02:00
parent 3f56411bcc
commit 20f10f8fbb

View File

@ -516,6 +516,9 @@ class Task(_Task):
cls.__update_master_pid_task(task=task)
# make sure we are started
task.started(ignore_errors=True)
# continue last iteration if we had any
if task.data.last_iteration:
task.set_initial_iteration(int(task.data.last_iteration) + 1)
else:
# subprocess should get back the task info
task = Task.get_task(task_id=is_sub_process_task_id)