Update Job Status Retention Policy#179
Open
ascibisz wants to merge 2 commits intofeature/pass-json-recipefrom
Open
Update Job Status Retention Policy#179ascibisz wants to merge 2 commits intofeature/pass-json-recipefrom
ascibisz wants to merge 2 commits intofeature/pass-json-recipefrom
Conversation
…on read, and misc bug fixes
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the retention policy for job status records from 24 hours to 30 days and implements timestamp updates to ensure only truly inactive jobs are cleaned up. It also fixes two bugs related to job status handling and error message serialization.
Changes:
- Retention policy for
job_statusincreased from 24 hours to 30 days - Job status timestamps now update on read to track active usage
- Fixed status display issue for previously-run recipes
- Fixed JSON serialization error for failed job responses
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/constants/firebase.ts | Updates retention period constant from 24 hours to 30 days |
| src/utils/firebase.ts | Adds new function to update job status timestamps and exports it |
| src/App.tsx | Implements timestamp updates, fixes status setting for cached jobs, and corrects error response handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rugeli
approved these changes
Feb 6, 2026
Contributor
rugeli
left a comment
There was a problem hiding this comment.
lgtm! this fits well with our current workflow! this is also making me think (out of scope for this pr) whether we should use "created_at" and last_used/last_accessed fields instead of timestamp. happy to chat about it later
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.
Problem
Since we're using the
job_statuscollection for matching subsequent runs of a recipe to it's results (instead of just providing results for a single run), we should increase the retention policy before we clean up runs.Link to story or ticket
Solution
job_statusfrom 24 hours to 30 daysjob_statuswhenever it's read, so we only clear out entries that haven't been accessed at all in 30 dayssetJobStatusafter our initial call togetJobStatus, so it'll be set with the proper value even if we don't enter thewhileloop