fix(scheduler): the timer run stands aside when a scan will trigger the steps - #54
Merged
Merged
Conversation
…he steps Measured 2026-09-14: with Run After IPTV Checker Scan on, the 05:05 run that had been waiting for the checker and the run the checker then triggered sorted the same channels concurrently, one second apart, in two workers. The timer path now checks, before it waits, whether a scan is running and the trigger setting is on; if so it logs that it is standing aside and returns "skipped". A missing or unreadable progress file counts as not running, so the schedule is unchanged where IPTV Checker is absent. The scheduled-run timestamp is not written for a run that stood aside. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJpo1EzMNmJiSiNpbwBi6G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measured on the first morning the IPTV Checker trigger fired (2026-09-14): the 05:05 run, which had been waiting for that scan under Wait for IPTV Checker Completion, saw the scan end and sorted the same 256 channels one second after the triggered run, in a different worker, while that run was still writing. No damage measured, but two delete-and-recreate passes over the same rows at once is not a state to leave open.
skipped._iptv_checker_is_runningfails open to False on a missing or unreadable progress file, so an installation without IPTV Checker keeps its schedule exactly as before.tests/test_iptv_checker_trigger.py; suite 1534 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01WJpo1EzMNmJiSiNpbwBi6G