feat: add QUEUE_JOB_RETENTION_AGE_SECONDS to environment configuration#921
Merged
feat: add QUEUE_JOB_RETENTION_AGE_SECONDS to environment configuration#921
Conversation
Introduced a new environment variable QUEUE_JOB_RETENTION_AGE_SECONDS to define the age (in seconds) after which completed or failed jobs are eligible for removal. Updated job options to utilize this variable for job retention settings.
|
Caution Review failedThe pull request is closed. WalkthroughIntroduced QUEUE_JOB_RETENTION_AGE_SECONDS to the environment schema with a 7-day default (in seconds) and wired it into runtimeEnvStrict. Updated worker queue configuration to source removeOnComplete.age and removeOnFail.age from this environment value instead of a hardcoded 7 days. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduced a new environment variable QUEUE_JOB_RETENTION_AGE_SECONDS to define the age (in seconds) after which completed or failed jobs are eligible for removal. Updated job options to utilize this variable for job retention settings.
PR-Codex overview
This PR focuses on updating job retention configurations in the
queues.tsfile to use environment variables for job age retention instead of hardcoded values. It also adds a new environment variable for job retention age inenv.ts.Detailed summary
In
src/worker/queues/queues.ts:removeOnCompleteandremoveOnFailto useenv.QUEUE_JOB_RETENTION_AGE_SECONDSinstead of a hardcoded value of 7 days.In
src/shared/utils/env.ts:QUEUE_JOB_RETENTION_AGE_SECONDS.QUEUE_JOB_RETENTION_AGE_SECONDSenvironment variable to the exportedenvobject.Summary by CodeRabbit
New Features
Chores