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
A sync job that fails is not retried. Add a retry policy for sync jobs: exponential backoff, a maximum number of attempts, and a visible failed state in tg status.
Job states are pending, running, completed and failed, with no attempt counter and no next-run time (src/db/sync-schema.ts).
Every error marks the job failed, including rate limits (src/daemon/sync-worker-utils.ts), and the daemon only logs it.
There is a hidden retry anyway: refreshQueues queues a new job for the chat on the next refresh, with no backoff and no limit. Permanent errors (for example "Could not build InputPeer") retry forever, and each try leaves a failed row that is never cleaned up (cleanupFailed has no callers).
tg status always shows failed_jobs: 0: the value is hard-coded in src/commands/status.ts.
Add to the scope: treat a FLOOD_WAIT as a delay rather than a failure, tell permanent errors from transient ones, and make tg status count failed jobs.
Activity
neoromantic commentedon Oct 21, 2026
Checked against the code on 2026-10-21:
pending,running,completedandfailed, with no attempt counter and no next-run time (src/db/sync-schema.ts).src/daemon/sync-worker-utils.ts), and the daemon only logs it.refreshQueuesqueues a new job for the chat on the next refresh, with no backoff and no limit. Permanent errors (for example "Could not build InputPeer") retry forever, and each try leaves a failed row that is never cleaned up (cleanupFailedhas no callers).tg statusalways showsfailed_jobs: 0: the value is hard-coded insrc/commands/status.ts.Add to the scope: treat a FLOOD_WAIT as a delay rather than a failure, tell permanent errors from transient ones, and make
tg statuscount failed jobs.