Repository navigation
Social media: video upload and processing, weekly backup, disk warning (#113) - #122
Merged
Merged
Conversation
#113) One video per Weekly update (MP4/MOV, 200 MB, 90 s), re-encoded in the background into a 1080p H.264/AAC copy and a small AI copy, with ffmpeg from imageio-ffmpeg; resumed after a restart. backup.sh archives the social-media volume weekly and on restore-test (2 newest kept) and compares it with the weekly_media rows. Staff see a warning above 80% disk use. Migration 0022. Also fixes the flaky My project photo test (it logged out mid-load). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #113, part of spec #110 (Social media posts).
What's new
ffmpeg -i. A second video, a longer or larger file, or a file that isn't a video is refused with a clear message.incoming/folder on the volume, never read into memory as a whole, and is deleted when it is refused.+faststart) and a small AI copy (640 px, no sound) for Social media: AI Post suggestions from the school LLM #114.resume_processingin the lifespan).imageio-ffmpegpackage: a static build with libx264, for Linux, Windows and macOS. So the Docker image, CI and local runs need noaptinstall. ffmpeg is called with fixed arguments, and the uploaded name is never used.GET /api/weekly-media/{id}now uses aFileResponse, and a video is only served once it is ready. Same access rules as photos.backup.sharchives thesocial-mediavolume (uncompressedtar, leaving outincoming/):restore-test, so after each deploy;KEEP_SOCIAL_MEDIA).weekly_mediarow.postgres:16against the test database: it passes, it fails with an extra file (1 file vs 0 rows), it ignores AI copies andincoming/, and the 3rd archive deletes the oldest.docs/backups.mdhas the restore steps.GET /api/social/storage(Teachers and the Superuser) returns the share of the disk in use.0022:weekly_media.state(processing, ready or failed) andseconds.Tests
test_weekly_video.pycovers:video/mp4, original gone);incoming/emptied;failed;Flaky test fixed:
test_my_project.py::test_student_sees_their_projects_photoclicked Log out while the reloaded Project page was still loading. Its last backend calls then ran without a session, and NiceGUI logged "Your session has expired" at teardown. The extra cards on the Project page (#111, #113) made this happen every time, which is how the cause showed up. The test now waits for the page's last card first. It passed 3/3, andtest_login.py3/3.Note on disk space: 2 weekly archives plus the live volume can take about 3× the media. With 10–15 Projects that is a few GB per month, which fits the 40 GB disk, and the warning shows at 80%.
🤖 Generated with Claude Code