feat(scheduler): admin run-now/run-all triggers + live progress + completion notices

Add per-job "Run now" buttons and a "Start all now" button to the admin Scheduler
dashboard (admin-gated endpoints). Triggers run the job in a background thread
independent of its interval, refusing a concurrent run (409). While running, the
long jobs (maintenance, enrich, backfill, shorts) report live progress through a
decoupled contextvar sink, shown as a progress bar on the job row via the existing
4s poll. A manually-triggered run posts a completion notification to the triggering
admin's inbox (scheduled runs stay silent to avoid spam); the inbox renders the
"scheduler" type trilingually from type+data. While here, give the maintenance job
its missing dashboard label/description in all three languages.
This commit is contained in:
npeter83 2026-06-18 04:01:10 +02:00
parent 22e3c2fdd8
commit 5988769cda
15 changed files with 344 additions and 30 deletions

View file

@ -12,5 +12,9 @@
"title": "Videos removed",
"body_one": "{{count}} saved or playlisted video was removed because it's no longer available on YouTube.",
"body_other": "{{count}} saved or playlisted videos were removed because they're no longer available on YouTube."
},
"jobDone": {
"titleOk": "{{job}} finished",
"titleError": "{{job}} failed"
}
}

View file

@ -25,6 +25,21 @@
"minutes": "min",
"editInterval": "Click to change how often this runs",
"intervalFailed": "Couldn't change the interval",
"runNow": "Run now",
"runAll": "Start all now",
"runAllHint": "Run every job now, in addition to their schedules.",
"runAllPausedHint": "Resume the scheduler to run jobs (they're skipped while paused).",
"triggered": "Started {{job}}",
"triggeredAll_one": "Started {{count}} job",
"triggeredAll_other": "Started {{count}} jobs",
"phase": {
"recheck": "Re-checking flagged videos",
"revalidate": "Re-validating videos",
"enrich": "Enriching videos",
"backfill_recent": "Backfilling recent uploads",
"backfill_deep": "Backfilling full history",
"probe": "Classifying Shorts"
},
"dot": {
"running": "running now",
"ok": "last run OK",
@ -39,7 +54,8 @@
"autotag": "Detects each channel's language/topics and applies automatic tags. If it stops, new channels get no auto tags, so language/topic filters miss them.",
"shorts": "Probes youtube.com/shorts to mark which videos are Shorts. If it stops, Shorts aren't separated from normal videos in the feed.",
"subscriptions": "Re-imports every user's YouTube subscriptions. If it stops, channels subscribed to or dropped on YouTube aren't reflected here.",
"playlist_sync": "Mirrors each user's YouTube playlists into the app. If it stops, changes to your YouTube playlists don't show up locally."
"playlist_sync": "Mirrors each user's YouTube playlists into the app. If it stops, changes to your YouTube playlists don't show up locally.",
"maintenance": "Finds videos that can no longer be played (deleted, made private, abandoned premieres), hides them from the feed and removes them after a grace period; re-checks the least-recently-checked videos. If it stops, dead videos linger in the catalogue."
},
"jobs": {
"rss_poll": "RSS poll (new uploads)",
@ -48,7 +64,8 @@
"autotag": "Auto-tagging",
"shorts": "Shorts classification",
"subscriptions": "Subscription resync",
"playlist_sync": "YouTube playlist sync"
"playlist_sync": "YouTube playlist sync",
"maintenance": "Maintenance + validation"
},
"queue": {
"recentPending": "Channels to sync",