Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Ensure media is in local cache before thumbnailing #2791

Merged
merged 3 commits into from
Feb 5, 2018

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Jan 16, 2018

If dynamic thumbnailing is disabled we know that we've just stored the file on disk when we go to generate thumbnails. However, if it is enabled then media may have been deleted from the local cache, in which case we need to download it again from a storage provider to the local cache.

This includes #2804

@erikjohnston erikjohnston force-pushed the erikj/media_storage_refactor branch 3 times, most recently from eab404a to e8932f6 Compare January 17, 2018 16:56

for provider in self.storage_providers:
res = yield provider.fetch(path, file_info)
if res:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd be inclined to make this if not res:; continue, to reduce indentation, but no matter

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@richvdh richvdh assigned erikjohnston and unassigned richvdh Jan 24, 2018
@erikjohnston erikjohnston merged commit 1f881e0 into develop Feb 5, 2018
@erikjohnston erikjohnston deleted the erikj/media_storage_refactor branch March 5, 2018 15:56
This was referenced Apr 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants