Skip to content

Use same database pool creation code for API server and background worker #11167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2025

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented May 13, 2025

This PR extracts a create_database_pool() fn from the API server initialization code and then subsequently uses it in the bin/background-worker binary.

This ensures that things like the connection_timeout and statement_timeout are consistently applied to both the API server and the background worker.

Turbo87 added 3 commits May 13, 2025 14:42
…struct

This allows us to configure these values per pool, but also allows us to pass only a single struct to the connection builder function instead of needing both.
@Turbo87 Turbo87 requested a review from a team May 13, 2025 12:47
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels May 13, 2025
Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

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

LGTM.

@Turbo87 Turbo87 merged commit 7bed5a3 into rust-lang:main May 13, 2025
9 checks passed
@Turbo87 Turbo87 deleted the create-database-pool branch May 13, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants