Skip to content

fix(worker): respect logging configuration on reload - #694

Open
zhechen-cs wants to merge 1 commit into
taskiq-python:masterfrom
zhechen-cs:fix/reload-logging
Open

zhechen-cs wants to merge 1 commit into
taskiq-python:masterfrom
zhechen-cs:fix/reload-logging

Conversation

@zhechen-cs

Copy link
Copy Markdown

Description

With --reload and --no-configure-logging, the reload warning calls logging.warning(), which installs a default root handler when none exists. The process manager's logging.debug() call does the same when handling a shutdown or reload event. This can cause duplicate output when the application subsequently configures its own logging.

Use the existing module loggers for both records so worker management respects configure_logging=False. Add subprocess regression coverage for all four combinations of reload and configure_logging, including processing a shutdown event.

Related to #472.

Validation:

  • Python 3.12: 375 tests passed.
  • The subprocess regression fails on unmodified master and passes with the fix.
  • All repository pre-commit checks passed (AST, whitespace, TOML, typos, secret detection, Ruff, Black, MyPy).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant