Skip to content

Commit d0bb3dd

Browse files
authored
list all batch job types (minio#20510)
continues minio#20480
1 parent ab7714b commit d0bb3dd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cmd/batch-handlers.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -1577,9 +1577,6 @@ func (a adminAPIHandlers) ListBatchJobs(w http.ResponseWriter, r *http.Request)
15771577
}
15781578

15791579
jobType := r.Form.Get("jobType")
1580-
if jobType == "" {
1581-
jobType = string(madmin.BatchJobReplicate)
1582-
}
15831580

15841581
resultCh := make(chan itemOrErr[ObjectInfo])
15851582

@@ -1608,7 +1605,7 @@ func (a adminAPIHandlers) ListBatchJobs(w http.ResponseWriter, r *http.Request)
16081605
continue
16091606
}
16101607

1611-
if jobType == string(req.Type()) {
1608+
if jobType == string(req.Type()) || jobType == "" {
16121609
listResult.Jobs = append(listResult.Jobs, madmin.BatchJobResult{
16131610
ID: req.ID,
16141611
Type: req.Type(),
@@ -2049,7 +2046,9 @@ func (j *BatchJobPool) canceler(jobID string, cancel bool) error {
20492046
canceler()
20502047
}
20512048
}
2052-
delete(j.jobCancelers, jobID)
2049+
if cancel {
2050+
delete(j.jobCancelers, jobID)
2051+
}
20532052
return nil
20542053
}
20552054

0 commit comments

Comments
 (0)