Move RSS and daily drains into the persistent worker - #90
Merged
Merged
Conversation
The public repository's scheduled workflows curled Cloud production from GitHub, so a Hetzner network outage surfaced as failed public-repo runs. The persistent worker now starts the due-feed tick every six hours and the daily indexing, Search Console, and operation-event retention drain, both also on worker start. Self-hosted scheduler containers are unchanged. 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.
Why
rss-cron.ymlandfull-cron.ymlran in this public repo and curled Cloud production. When the Hetzner host lost network on 2026-09-25, they started failing and emailing. Production scheduling belongs with production.What
background-worker.ts: a non-blocking periodic scheduler inside the existing worker loop.RSS_CRON_MAX_FEEDS/RSS_CRON_MAX_POSTS_PER_FEEDthroughreadCronDrainConfig.operation_eventspurge (previously only the all-task drain purged them).runSchedulerdue checks and feed claims keep that safe. An unfinished run is never started twice, and a failure waits for the next interval.rss-cron.yml,full-cron.yml, andcampaign-cron.yml.architecture.md,operations.md, andrss-scheduler.md.Self-hosted Compose, Dokploy, and Railway schedulers are unchanged. The Cloudflare fallback Worker is unchanged.
Verification
npm run test:server: all 59 self-tests pass, including new periodic-scheduler casestsc --noEmitis clean;git diff --checkis cleanDeploy note
RSS has no scheduler between merging this and the Cloud worker image rolling out. Deploy promptly after the Cloud sync. Then remove the now-unused
BLOGFACTORY_CRON_SECRETrepo secret.🤖 Generated with Claude Code