mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
batch-expiry: Save progress regularly in the drives and at the end (#20098)
- Also, fix failure reporting at the end. - Also, avoid parsing report objects when listing or resuming jobs, this does not cause any bugs, it is only printing, not useful errors.
This commit is contained in:
@@ -1567,6 +1567,9 @@ func (a adminAPIHandlers) ListBatchJobs(w http.ResponseWriter, r *http.Request)
|
||||
writeErrorResponseJSON(ctx, w, toAPIError(ctx, result.Err), r.URL)
|
||||
return
|
||||
}
|
||||
if strings.HasPrefix(result.Item.Name, batchJobReportsPrefix+slashSeparator) {
|
||||
continue
|
||||
}
|
||||
req := &BatchJobRequest{}
|
||||
if err := req.load(ctx, objectAPI, result.Item.Name); err != nil {
|
||||
if !errors.Is(err, errNoSuchJob) {
|
||||
@@ -1883,6 +1886,9 @@ func (j *BatchJobPool) resume(randomWait func() time.Duration) {
|
||||
batchLogIf(j.ctx, result.Err)
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(result.Item.Name, batchJobReportsPrefix+slashSeparator) {
|
||||
continue
|
||||
}
|
||||
// ignore batch-replicate.bin and batch-rotate.bin entries
|
||||
if strings.HasSuffix(result.Item.Name, slashSeparator) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user