poller fixes per profil
This commit is contained in:
@@ -203,9 +203,11 @@ def start_scheduler(socketio=None) -> None:
|
||||
profile_id = int(row["profile_id"])
|
||||
with connect() as conn:
|
||||
owner = conn.execute("SELECT user_id FROM rtorrent_profiles WHERE id=?", (profile_id,)).fetchone()
|
||||
profile = get_profile(profile_id, int(owner["user_id"] if owner and owner.get("user_id") else default_user_id()))
|
||||
owner_id = int(owner["user_id"] if owner and owner.get("user_id") else default_user_id())
|
||||
profile = get_profile(profile_id, owner_id)
|
||||
if profile:
|
||||
result = check(profile, only_due=True)
|
||||
# Note: RSS jobs run with the profile owner in background mode, independent of browser activity.
|
||||
result = check(profile, user_id=owner_id, only_due=True)
|
||||
if socketio and result.get("queued"):
|
||||
socketio.emit("rss_checked", {"profile_id": profile["id"], **result}, to=f"profile:{profile['id']}")
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user