Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GoodJob.cleanup_preserved_jobs: add :include_discarded option (#1550)
This change allows the caller of GoodJob.cleanup_preserved_jobs to specify the :include_discarded option, rather than always relying on the value that is set in the configuration. This would enable us to e.g. set config.cleanup_preserved_jobs_before_seconds_ago to a very low value (e.g. 10 seconds), but also set config.cleanup_discarded_jobs = false so that we can retain discarded jobs for longer in case we want to inspect them or manually retry then. We would then set up a separate maintenance job to call GoodJob.cleanup_preserved_jobs(older_than: some_longer_period, include_discarded: true). Co-authored-by: Ben Sheldon [he/him] <[email protected]>
- Loading branch information