Four patterns that keep my YouTube longform JSON queue from going stale
I manage the YouTube longform queue for my BuilderStack channel as JSON files in content/yt-longform-queue/ . A spec file lands there when a generator script commits a new dialogue; the publish workflow picks the file, renders it to MP4, uploads it, then moves the file to uploaded/ . No external queue service, no database rows, no management dashboard. This has worked for three months without a…
The YouTube longform queue for the BuilderStack channel operates as a JSON file in the content/yt-longform-queue directory. When a new dialogue generator script commits a spec file, it is added to this queue. The publish workflow then takes over, selecting a file, rendering it to MP4, uploading it, and moving it to the uploaded directory.
No external queue service, database, or management dashboard is used. This system has been stable for three months without major incidents, and four key patterns contribute to its reliability.
Firstly, the picker uses an explicit priority rank for different types of content, with product walkthrough videos having the highest priority (rank 0) and recap videos having the lowest (rank 7). If a recap spec is committed while a product walkthrough is already in the queue, the recap will be published after the product content due to its lower priority rank. This ensures that product walkthroughs, which drive channel growth, are published first.
Secondly, within each rank tier, files are sorted by filename in ascending order (oldest-first). This means that older files within the same priority rank will be published before newer ones, preventing stale content from lingering indefinitely.
Thirdly, the queue includes a 21-day stale expiry system. Spec files are prefixed with a date (YYYY-MM-DD-slug.json), and the picker removes any files older than 21 days before selecting what to publish. This ensures that long-pending specs do not accumulate indefinitely and that the queue remains manageable.
Lastly, the workflow is designed to handle concurrency and empty queues gracefully. When a new spec is committed, the publish workflow fires immediately to publish the content. However, if a render is already in progress, a second push trigger (representing a new spec) will queue the new request without interrupting the ongoing render.
The workflow also includes a clean-skip pattern for empty queues. If the queue is empty, the picker returns an empty string, and the workflow exits cleanly without failing. This prevents unnecessary failures in the GitHub Actions history and maintains pipeline health during quiet periods.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.