Repository navigation
A crash-safe media job queue with BLMOVE in OpenMontage Drama Studio #4523
charliewwdev
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I built OpenMontage Drama Studio, a self-hosted web app that turns a one-line idea into a short AI drama. Its media job queue runs on redis-py, so I'm sharing the pattern here in case it's useful.
What it does: a 7-stage pipeline: idea → script → cast → scenes → props → storyboard → video → voice → edit. You can review, edit and re-run each stage before moving on.
How redis-py is used (
studio/server/job_queue.py):redis.Redis.from_url(REDIS_URL, decode_responses=True, socket_connect_timeout=2). If Redis isn't reachable, jobs fall back to an in-process thread pool, so single-container dev still works.rpush. There are two queues: image jobs (character, scene and prop reference stills) are taken before video jobs, because a missing reference image makes the clip fail QA.media_workerprocess claims jobs reliably withblmove(source, processing, timeout, "RIGHT", "LEFT"), falling back tobrpoplpushon older servers, instead of a destructiveBLPOP. Finished jobs are removed withlrem. After a crash or restart, the worker moves anything left in the processing list back onto the queue.setex(1h TTL), and Compose runs Redis with AOF so pending jobs survive a Redis restart.Run it:
docker compose -f docker-compose.studio.yml upstarts the API, web UI, Postgres and Redis. You bring S3/MinIO, an LLM key and a Volcengine Ark key (Seedream/Seedance are paid third-party APIs).It's AGPL-3.0. It's an independent product rebuilt from the calesthio/OpenMontage codebase and isn't affiliated with that project. It's early (v0.1.0), so feedback is welcome.
All reactions