Skip to content

Commit

Permalink
Better handle errors on individual objects in lifecycle v2
Browse files Browse the repository at this point in the history
And let `_compareRulesToList()` retry just a little bit, to limit impact/delay
while ensuring message gets processed timely.

Issue: BB-437
  • Loading branch information
francoisferrand committed Oct 13, 2023
1 parent b1688b6 commit da37533
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions extensions/lifecycle/tasks/LifecycleTaskV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,15 @@ class LifecycleTaskV2 extends LifecycleTask {
}
return async.eachLimit(contents, CONCURRENCY_DEFAULT, (obj, cb) => {
const applicableRules = this._getRules(bucketData, lcRules, obj);
return this._compare(bucketData, obj,
applicableRules, log, cb);
return this._retryEntry({
logFields: {
key: obj.Key,
versionId: obj.VersionId,
staleDate: obj.staleDate,
},
log,
actionFunc: done => this._compare(bucketData, obj, applicableRules, log, done),
}, cb);
}, done);
}

Expand Down

0 comments on commit da37533

Please sign in to comment.