Conversation
Worker processes only reconfigured logging when the start method was "spawn". A "forkserver" child also starts from a fresh interpreter and inherits nothing from the main process, so it logged nothing at all. "forkserver" is the default start method on Linux since Python 3.14. Configure logging in every start method except "fork", the only one that inherits the parent's configuration. Closes taskiq-python#685
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #686 +/- ##
==========================================
- Coverage 85.37% 85.37% -0.01%
==========================================
Files 68 68
Lines 2660 2659 -1
==========================================
- Hits 2271 2270 -1
Misses 389 389 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
danfimov
requested changes
Sep 26, 2026
Keep the fix to the if-statement in start_listen, and replace the mocked tests with a test that starts a real `taskiq worker` for each available start method and waits for "Listening started." in its output.
This branch has not been deployed
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 #685
Worker processes only reconfigured logging when the start method was
spawn. Aforkserverchild also starts from a fresh interpreter, so it inherited nothing and logged nothing: noListening started., no shutdown messages.forkserveris the default start method on Linux since Python 3.14.configure_child_logging(args)helper, called fromstart_listen. It configures logging for every start method exceptfork, the only one that inherits the parent's configuration.tests/cli/worker/test_child_logging.pycoverspawnandforkserver,fork, and--no-configure-logging.I ran the reproduction from #685 against this branch on Python 3.14.7.
worker-0now logsListening started.once with each offork,spawn,forkserverand the default.prek run -aandpytest -n autopass locally.