[3.x] Allow trimming completed jobs #720
Merged
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.
High memory consumption was reported in #715. Between v3.2.2 and the most recent version, I couldn't locate a change that may cause this.
However, the proposed solution in the issue seems useful. Basically, this PR adds the ability to purge completed jobs separately, so for example you may keep your recent jobs fo 60 minutes, failed jobs for 7 days, but purge completed jobs every 5 minutes.
One side effect of this change is that the list of recent jobs may include a lot of completed jobs that were purged but still exist in the
recent_jobs
set and thus paginated results will look strange.One thing we can do is to have a separate list for: