Changing a stream's fetch interval skips its immediate fetch run #111
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Every time a stream's fetch interval is edited in the UI, the scheduler logs
Execution of job "StreamScheduler._fetch_stream_job" skipped: maximum number of running instances reached (1)and the stream does not poll again until a full new interval has elapsed.Observed 8 times across two testing sessions (2026-09-08,
fenliu-all.log), each skip second-aligned with an interval edit — e.g. six skips while streams 3–8 were all set to 48 minutes in the 17:00 session.Impact
Not a crash and no data loss, but every interval edit wastes the immediate fetch cycle: a user shortening an interval expecting a prompt next poll waits a full interval instead. With long intervals (hours) that delay is very noticeable.
Findings from the log analysis (both 2026-09-08 sessions):
remove_job stream_N+_real_add_job(theStreamScheduler._adapt_schedulepath) plus theUPDATE hashtag_streams SET fetch_interval_minutes=...for that stream.max_instances=1rejects it. The success log of the old instance and the skip appear within the same event batch.Plan of attack (sketch)
_adapt_scheduleaccordingly (e.g. pass an explicitnext_run_time/start_date when re-adding, or set the trigger start_date forward).skipped: maximum instanceswarning and a next run consistent with the chosen semantics.