This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
Expiration of outdated images in the database #483
Merged
Merged
Conversation
This file contains 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
…into image_expiration
ChariniNana
requested review from
a team,
kss682 and
mathemancer
and removed request for
a team
August 13, 2020 22:52
mathemancer
suggested changes
Aug 21, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made one stylistic suggestion.
Overall, this looks great though, thank you! I'm really excited to have this functionality.
Co-authored-by: Brent Moran <brent@creativecommons.org>
mathemancer
approved these changes
Aug 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes
Fixes #482 by @ChariniNana
Description
This pull request handles the image expiration logic, where the
updated_on
value associated with an image is older than what it can be as per the re-ingestion logic of the corresponding provider.Technical details
We specify the oldest possible value the
updated_on
attribute can take per each provider (based on the re-ingestion strategy) in a dictionary. If certain images in the database are deemed to be outdated as per this logic, we set the correspondingremoved_from_source
value to True.Tests
The
test_image_expiration
function in thetest_sql
test suite checks whether the image expiration logic works as expected.Checklist
Update index.md
).main
ormaster
).I added or updated documentation (if applicable).visible errors.
Developer Certificate of Origin
Developer Certificate of Origin