chore(scheduler): dedup token-user query + drop pointless rss lambda
- Extract runner.token_users(db): the "all users with a stored refresh token"
query was spelled 3× (get_service_user, run_subscription_resync,
sync_all_playlists). get_service_user now reuses it ([0]); sync_all_playlists
imports it from runner (no cycle — runner doesn't import playlists); the now-
unused OAuthToken import is dropped there.
- scheduler.py: _job("rss_poll", lambda db: run_rss_poll(db)) → _job("rss_poll",
run_rss_poll) — the lambda was dead indirection; all sibling jobs pass the
callable directly and _job calls fn(db).
Behavior-neutral. ruff clean, localdev boots, re-review clean.
This commit is contained in:
parent
4e68bdf920
commit
a6ffcf9577
3 changed files with 14 additions and 23 deletions
|
|
@ -209,7 +209,7 @@ def scheduler_snapshot() -> dict:
|
|||
|
||||
|
||||
def _rss_job() -> None:
|
||||
_job("rss_poll", lambda db: run_rss_poll(db))
|
||||
_job("rss_poll", run_rss_poll)
|
||||
|
||||
|
||||
def _enrich_job() -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue