Repository navigation
fix: shut down cleanly after a failed startup - #91
Merged
Merged
Conversation
danfimov
force-pushed
the
fix/shutdown-after-failed-startup
branch
3 times, most recently
from
November 25, 2026 22:14
79d0e3a to
8b35b01
Compare
danfimov
force-pushed
the
fix/shutdown-after-failed-startup
branch
5 times, most recently
from
November 25, 2026 22:40
8214752 to
d36626d
Compare
The psycopg and psqlpy brokers create some connection attributes only in startup(). When startup() failed before that, shutdown() raised AttributeError instead of closing what had been opened; taskiq logs it as 'Exception found while shutting down broker'. shutdown() now skips what startup() did not create.
danfimov
force-pushed
the
fix/shutdown-after-failed-startup
branch
from
November 25, 2026 22:40
d36626d to
3b40484
Compare
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.
The psycopg and psqlpy brokers create some attributes only in
startup(). Whenstartup()failed before that,shutdown()raisedAttributeError. taskiq logs it asException found while shutting down broker; the stress harness hit it when a worker failed to start.shutdown()now skips whatstartup()did not create.Test: startup fails before LISTEN is set up (all four drivers), and
shutdown()must not raise.Part of a stack; review and merge bottom-up. Stress-harness numbers are from a local run: 4 drivers, ~250–550 kicks per scenario, 2 worker processes per driver.