fix doubled "waiting for manual poll" log on every poll cycle - #734
Merged
Merged
Conversation
The poller's main loop computed timeouts in two passes: ``_get_min_timeout`` to find the soonest due library, then ``_poll_due_libraries`` to actually poll them. Both called ``_get_poll_timeout`` per library, and that helper emits the INFO line "Library X waiting for manual poll." as a side effect for every ``poll=False`` library it sees. Result: the line appeared twice in the log every cycle a library was due — most visibly for the ``custom-covers`` library, which is always poll=False. Fold the two passes into one method that polls each due library inline and folds its post-poll ``poll_every`` into the running min, so each library is inspected exactly once per cycle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
_get_min_timeoutto find the soonest due library, then via_poll_due_librariesto actually poll them._get_poll_timeout, and that helper emits an INFO lineLibrary X waiting for manual poll.as a side effect for everypoll=Falselibrary it sees. So the line shows up twice every hour for thecustom-coverslibrary._poll_due_and_get_next_timeout, which polls each due library inline and folds its post-pollpoll_everyinto the running min. Each library is now inspected exactly once per cycle.Production log evidence (note the duplicated lines):
Test plan
make fixandmake lint(the unrelatedremarkerror on.is preexisting on develop)pytest tests/— 35 passedcustom-covers waiting for manual pollINFO line appears once per polling cycle, not twicepoll_everyinto the running min so the wait isn'tNone)🤖 Generated with Claude Code