Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If assignment status is complete or failed return task #485

Merged
merged 1 commit into from
Nov 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions orchestra/utils/task_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ def complete_and_skip_task(task_id):
task = Task.objects.get(id=task_id)
assignment = current_assignment(task)
if assignment and assignment.worker:
if assignment.status != TaskAssignment.Status.PROCESSING:
return task
task_data = assignment.in_progress_task_data or {}
task_data.update(_orchestra_internal={'complete_and_skip_task': True})
submit_task(
Expand Down