Skip to content

Task status v2#1558

Merged
aarontp merged 6 commits intogoogle:masterfrom
jleaniz:task-status-v2
Oct 1, 2024
Merged

Task status v2#1558
aarontp merged 6 commits intogoogle:masterfrom
jleaniz:task-status-v2

Conversation

@jleaniz
Copy link
Collaborator

@jleaniz jleaniz commented Oct 1, 2024

Description of the change

Refactor task status tracking in task_manager to utilize Celery state to determine actual task status.

Applicable issues

  • fixes #

Additional information

Checklist

  • All tests were successful.
  • Unit tests added.
  • Documentation updated.

@jleaniz jleaniz self-assigned this Oct 1, 2024
@jleaniz jleaniz marked this pull request as ready for review October 1, 2024 16:51
@jleaniz jleaniz requested a review from aarontp October 1, 2024 16:51
Copy link
Member

@aarontp aarontp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. I think adding the dedicated task state attribute makes a lot of sense and cleans it up.

One general note just for the record (not sure where else to record, this, maybe we want to put something in the PR description): Because we're updating the task object attributes after the task is scheduled I don't think we won't be able to update the full task data from the worker without clobbering some data there. This is fine because we're not doing this right now, but in the future we'll want to update at least the task status so we should keep that in mind then.

"""
raise NotImplementedError

def update_task_status(self, task, status=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will want to update the task status from the task in order to get mid-run updates, but we can always add this or similar back in when we actually utilize that.

@aarontp aarontp merged commit c290576 into google:master Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants