refactor: drop vestigial client param from _consume - #100
Merged
Merged
Conversation
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.
Closes #65.
TimersSubscriber.start()passedself._clientinto_consumeas a positional argument, and_consumeused it once, for the startupping()that setsstart_signal. The loop's Redis I/O already goes throughTimerStore, which readsConnectionState.clienton every call._consumenow takes onlystart_signaland pings through the existing_clientproperty. This finishes what #43 did for_get_msgsand_claim_and_consume.#65 raised a reconnect concern: binding the client at start could keep a stale client. That doesn't apply. The bound client was only ever used for the one ping before the loop starts, and nothing rebinds
ConnectionState._clientwhile the broker runs (connect()returns the caller-owned client,disconnect()does nothing, and only the test broker's_patch_brokerswaps it, before any loop runs). So behavior is unchanged and no comment about binding is needed.add_taskis called withfunc_kwargs=by keyword sincefunc_argsdefaults toNone.Verification:
just lint-cipasses.