Skip to content

Fix sqlalchemylogger for use with gunicorn - #3206

Open
mki-c2c wants to merge 18 commits into
masterfrom
gunicorn_sqlalchemylogger
Open

mki-c2c wants to merge 18 commits into
masterfrom
gunicorn_sqlalchemylogger

Conversation

@mki-c2c

@mki-c2c mki-c2c commented Jul 23, 2026

Copy link
Copy Markdown
Member

The forking server gunicorn will start the bachground thread of the sqlalchemylogger in the main process by default
synchronisation will not work correctly.

This patch enables delaying the logger startup to move it to a post_fork hook if needed

@sbrunner sbrunner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some cosmetic comments :-)

Comment thread c2cwsgiutils/sqlalchemylogger/README.md Outdated
Comment thread c2cwsgiutils/sqlalchemylogger/README.md Outdated
Comment thread c2cwsgiutils/sqlalchemylogger/README.md Outdated
Comment thread c2cwsgiutils/sqlalchemylogger/README.md Outdated
Comment thread c2cwsgiutils/sqlalchemylogger/README.md Outdated
Comment thread c2cwsgiutils/sqlalchemylogger/README.md Outdated
@mki-c2c
mki-c2c marked this pull request as ready for review July 31, 2026 17:47
@mki-c2c
mki-c2c requested a review from sbrunner July 31, 2026 17:47
@mki-c2c

mki-c2c commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

@sbrunner
I do not understand why the CI will not work on the PR, I corrected the CI comments, but could you please help me and check what is missing ?

@mki-c2c

mki-c2c commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

@sbrunner feel free to merge if you feel the failed CI item is OK.

@mki-c2c
mki-c2c enabled auto-merge September 8, 2026 09:34
@mki-c2c
mki-c2c disabled auto-merge September 8, 2026 09:34
@mki-c2c

mki-c2c commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@sbrunner I can't merge, but the errors are OK for me, nothing related to changes, essentially warnings for missing copyright notice.

Could you please merge for me ?

@sbrunner

sbrunner commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Can you do a rebase to be on the latest version of master and also squash the commits?

mki-c2c and others added 18 commits September 8, 2026 15:06
Add delay_startup option to SQLAlchemyHandler initialization.
From the artifact of the previous workflow run
Added usage instructions for configuring SQLAlchemyLogger with Gunicorn.
From the artifact of the previous workflow run
production.ini file seems to follow python dict conventions
Add type hints to start and _start methods
From the artifact of the previous workflow run
Co-authored-by: Stéphane Brunner <sbrunner@users.noreply.github.com>
Co-authored-by: Stéphane Brunner <sbrunner@users.noreply.github.com>
Co-authored-by: Stéphane Brunner <sbrunner@users.noreply.github.com>
Co-authored-by: Stéphane Brunner <sbrunner@users.noreply.github.com>
Co-authored-by: Stéphane Brunner <sbrunner@users.noreply.github.com>
Co-authored-by: Stéphane Brunner <sbrunner@users.noreply.github.com>
@mki-c2c
mki-c2c force-pushed the gunicorn_sqlalchemylogger branch from d27b91a to 113580c Compare September 8, 2026 13:06
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.

2 participants