feat: recreate thumbnails#10
Open
SeduroDotCom wants to merge 1 commit into
Open
Conversation
SeduroDotCom
force-pushed
the
mr/recreate-thumbnails
branch
from
July 14, 2026 10:14
aa8bae7 to
0cd1a27
Compare
urs-van-binsbergen
approved these changes
Jul 14, 2026
urs-van-binsbergen
left a comment
Contributor
There was a problem hiding this comment.
Tested ✅
Little detail: typo in the commit comment in webapp:
Submodule webapp 94bd7bc..db117b0:
> chore: udpate dl
nimaai
requested changes
Jul 16, 2026
nimaai
left a comment
Member
There was a problem hiding this comment.
good. the only concerns:
- Non-atomic recreation window (main risk):
recreate_thumbnail_files!deletes the oldPreviewrows and their files before callingcreate_previews!. If
create_previews!raises (as tested in "when thumbnail recreation fails"), the media file is left with zero previews until the action is retried successfully.
For an admin tool this is probably an acceptable trade-off (old files must be removed to reuse filenames), but it's worth confirming that's intentional —
e.g. document it in the flash/error message or the linked issue, since a transient conversion failure now destroys working thumbnails rather than leaving
them in place. - Narrow rescue in
delete_thumbnail_files: onlyErrno::ENOENT,Errno::EROFSare swallowed. Other IO errors (e.g.Errno::EACCESon permission-restricted
storage) will propagate, delete no more files, but the preview rows for not-yet-processed files have already been deleted in the same transaction —
consistent with point 1, just flagging the same class of issue surfaces here too.
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.
Madek/Madek#920