fix(rest) : Set job status as Failed when any one of the job is failed #1812
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.
Description
This pull request fixes bug #1805 .
Set the overall job status to Failed, if any one of the job is Failed.
Changes
Corrected the order of job status verification in such a way that Failure status is validated first.
How to test
curl -k -s -S -X GET http://localhost/repo/api/v1/jobs?upload=<id> -H "Authorization: Bearer <TOKEN>"
Response :
[
{
"id": 3,
"name": "filename",
"queueDate": "2020-10-06 12:17:51.458106+00",
"uploadId": "3",
"userId": "3",
"groupId": "3",
"eta": 0,
"status": "Failed" ->>>>>> Without this fix Job status is showing as Queued even when ununpack is failed.
}
]
Fixes #1805