Better task lifecycle tracking and client updates #1559
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a new endpoint to get information about a task regardless of its state. In the previous setup, you would need to grab it from the history endpoint if it was inactive or the tasks endpoint if it was active. Now, this will also check pending (in the case that you include a runId).
The new endpoint will return a
SingularityTaskState
object if the task exists, which will either have the state or a marker that the task is still pending. theid
in that object will be aSingularityTaskId
if it is active/inactive, or aSingularityPendingTaskId
if it is still pending.I also took the opportunity to update the SingularityClient a bit (/fixes #1430)
@gchomatas this will help with tracking the state of the task. Would you want any additional information about it, or is the state mostly what you would be after?