Add transcode/packaging worker, job slugs, deletes and zip downloads #6

Open
skruger wants to merge 1 commits from transcode_control into main
Owner

Worker:

  • manage.py run_worker polls the database for pending transcode jobs (ffmpeg)
    and packaging jobs (Bento4 mp4fragment + mp4hls). Jobs are claimed with a
    conditional UPDATE, a heartbeat thread marks progress, stale jobs are failed,
    and SIGTERM returns an interrupted job to the queue.
  • SQLite runs in WAL mode with IMMEDIATE transactions and a busy timeout so the
    web server and worker can share the database.
  • transcode.py exposes a reusable transcode() and the HW->CPU fallback works.
  • Docker image includes ffmpeg and a checksum-verified Bento4 SDK.

Jobs and storage:

  • TranscodeJob and PackagingJob have slugs, set explicitly on creation; outputs
    go to transcodes// and packages//hls/. Migrations regenerated.
  • Uploads into transcodes/ and packages/ are refused; the uploader defaults to
    the videos/raw folder.

UI:

  • New packaging job button on transcode jobs.
  • Delete views for packaging jobs, transcode jobs, uploaded files and content
    entries, each removing files before records and refusing while referenced.
    TranscodeJob.asset is now SET_NULL so deleting a source keeps its jobs.
  • Streamed zip downloads for completed transcode jobs and packages, rooted at
    the job slug; the content page lists packages with download buttons.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Worker: - manage.py run_worker polls the database for pending transcode jobs (ffmpeg) and packaging jobs (Bento4 mp4fragment + mp4hls). Jobs are claimed with a conditional UPDATE, a heartbeat thread marks progress, stale jobs are failed, and SIGTERM returns an interrupted job to the queue. - SQLite runs in WAL mode with IMMEDIATE transactions and a busy timeout so the web server and worker can share the database. - transcode.py exposes a reusable transcode() and the HW->CPU fallback works. - Docker image includes ffmpeg and a checksum-verified Bento4 SDK. Jobs and storage: - TranscodeJob and PackagingJob have slugs, set explicitly on creation; outputs go to transcodes/<slug>/ and packages/<slug>/hls/. Migrations regenerated. - Uploads into transcodes/ and packages/ are refused; the uploader defaults to the videos/raw folder. UI: - New packaging job button on transcode jobs. - Delete views for packaging jobs, transcode jobs, uploaded files and content entries, each removing files before records and refusing while referenced. TranscodeJob.asset is now SET_NULL so deleting a source keeps its jobs. - Streamed zip downloads for completed transcode jobs and packages, rooted at the job slug; the content page lists packages with download buttons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skruger added 1 commit 2026-12-03 16:36:02 -07:00
Add transcode/packaging worker, job slugs, deletes and zip downloads
Build and publish / test (pull_request) Successful in 49s
Build and publish / build (pull_request) Failing after 5m17s
Build and publish / pypi (pull_request) Skipped
Build and publish / cleanup (pull_request) Skipped
73b549cb18
Worker:
- manage.py run_worker polls the database for pending transcode jobs (ffmpeg)
  and packaging jobs (Bento4 mp4fragment + mp4hls). Jobs are claimed with a
  conditional UPDATE, a heartbeat thread marks progress, stale jobs are failed,
  and SIGTERM returns an interrupted job to the queue.
- SQLite runs in WAL mode with IMMEDIATE transactions and a busy timeout so the
  web server and worker can share the database.
- transcode.py exposes a reusable transcode() and the HW->CPU fallback works.
- Docker image includes ffmpeg and a checksum-verified Bento4 SDK.

Jobs and storage:
- TranscodeJob and PackagingJob have slugs, set explicitly on creation; outputs
  go to transcodes/<slug>/ and packages/<slug>/hls/. Migrations regenerated.
- Uploads into transcodes/ and packages/ are refused; the uploader defaults to
  the videos/raw folder.

UI:
- New packaging job button on transcode jobs.
- Delete views for packaging jobs, transcode jobs, uploaded files and content
  entries, each removing files before records and refusing while referenced.
  TranscodeJob.asset is now SET_NULL so deleting a source keeps its jobs.
- Streamed zip downloads for completed transcode jobs and packages, rooted at
  the job slug; the content page lists packages with download buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some required checks failed
Build and publish / test (pull_request) Successful in 49s
Build and publish / build (pull_request) Failing after 5m17s
Build and publish / pypi (pull_request) Skipped
Build and publish / cleanup (pull_request) Skipped
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin transcode_control:transcode_control
git checkout transcode_control
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: skruger/privatestudio#6