Skip to content

Commit

Permalink
Mark batch job status properly
Browse files Browse the repository at this point in the history
Client side overall status was always shown as `in-progress` even if
job was successful or failed.

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
  • Loading branch information
shtripat committed Oct 21, 2024
1 parent 65aa514 commit 225e8ad
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmd/batch-status.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,19 @@ func mainBatchStatus(ctx *cli.Context) error {
return
}

printMsg(batchJobStatusMessage{
m := batchJobStatusMessage{
Status: "in-progress",
Metric: job,
})
}
switch {
case job.Complete:
m.Status = "complete"
case job.Failed:
m.Status = "failed"
default:
// leave as is with in-progress
}
printMsg(m)
if job.Complete || job.Failed {
cancel()
return
Expand Down

0 comments on commit 225e8ad

Please sign in to comment.