You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run each account's sync jobs independently in the daemon #60
Since #17 each account has its own cache, scheduler and sync worker, but the daemon still runs one sync job at a time: the job loop takes turns between accounts and awaits each job before the next tick.
mtcute's flood waiter sleeps inside the call for up to 5 minutes. While one account's messages.getHistory sleeps through a FLOOD_WAIT, the loop is blocked, so every other account's jobs wait too, even though their own rate limits are fine. With three or more busy accounts each one also syncs more slowly than alone, because there is one job per tick overall.
Fix: run each account's job loop on its own (one in-flight job per account, the 3 s inter-job delay per account as today), so one account's FLOOD_WAIT or slow page never stalls the others. Keep the per-account lane cycle and the retry rules of #6 and #9.
Done when a test with two accounts shows account 2 finishing jobs while account 1's job sleeps in a FLOOD_WAIT, and docs/daemon.md and docs/sync-strategy.md describe the per-account loops.
Activity
docs: say which FLOOD_WAITs stay within one account (#60)
docs: say which FLOOD_WAITs stay within one account (#60)
docs: say which FLOOD_WAITs stay within one account (#60)
docs: describe per-account job loops wherever the serial loop was
docs: describe per-account job loops wherever the serial loop was
test(daemon): keep one owner per sync scheduling contract