Skip to content

Enable setting database pool limits from environment variables #732

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 1 commit into from
May 27, 2017

Conversation

carols10cents
Copy link
Member

@sgrif I'm trying to test out #730 on staging and I'm overwhelming the db limit of 20 connections there again :( This'll let me set prod and staging differently. I did unify the settings for rust-postgres and diesel though, with the thought that hopefully we'll be getting rid of the rust-postgres connections soon anyway.

@@ -47,15 +48,33 @@ impl App {

github.scopes.push(String::from("read:org"));

let db_pool_size = match (env::var("DB_POOL_SIZE"), config.env) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it's worth just removing the env defaults and assume that if the var is unset it's in development mode?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like reasonable production defaults as well.

Copy link
Contributor

@sgrif sgrif left a comment

Choose a reason for hiding this comment

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

LGTM

@carols10cents carols10cents merged commit c25088f into rust-lang:master May 27, 2017
@carols10cents carols10cents deleted the db-env-vars branch May 27, 2017 02:31
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