Scheduled tasks missing from GatedTaskKeys run on every replica #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context: multi-replica stateless deployment (two 2-replica apps,
cheeztvandfafflix, each one PostgreSQL plus valkey, no sticky sessions). Not a 12.0 regression — live in the deployed build. Tracking: #12.Problem
MediaBrowser.Controller/ScheduledTasks/ScanLeaderOptions.cs:26-36gates only some timer-driven tasks on the scan leader. Ungated, and therefore running on every replica:DownloadLyricsDownloadSubtitlesTmdbRefreshUpcomingEpisodesRefreshTrickplayImagesMoveTrickplayImagesRefreshInternetChannelsRefreshGuidePluginUpdateTaskConsequences: N× duplicate ffmpeg and network work, third-party API quota burned N× over, racing writes to the same rows, and concurrent plugin-assembly writes into the shared
/config/plugins.Scope: this issue is only about the key list. The separate
Jellyfin:ScanLeader:Enableddefault is handled in PR #11.Proposal
Add the keys above to
GatedTaskKeys.Add a test pinning every entry of
GatedTaskKeysto a task key that actually exists — a key matching nothing silently un-gates its task, so a typo or an upstream rename degrades to the current behaviour with no signal. There is already precedent for this test in the repo.Acceptance
GatedTaskKeys.GatedTaskKeysresolves to a registeredIScheduledTaskkey, failing on a typo or an upstream rename.