Skip to content
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

Set conn_max_age to nonzero if env var is present in ECS environment #868

Merged
merged 3 commits into from Mar 29, 2019

Conversation

rstorey
Copy link
Member

@rstorey rstorey commented Mar 27, 2019

No description provided.

@rstorey rstorey self-assigned this Mar 27, 2019
@rstorey rstorey requested a review from acdha March 27, 2019 18:39
Copy link
Member

@acdha acdha left a comment

Choose a reason for hiding this comment

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

There's a big white-space change in this commit — can we run that through Prettier so it's not so big? I'm worried that the indentation being significant will actually matter.

@@ -87,3 +87,6 @@
"Transcribed and reviewed by volunteers participating in the "
"By The People project at crowd.loc.gov."
)

if os.getenv("CONN_MAX_AGE_NONZERO"):
Copy link
Member

Choose a reason for hiding this comment

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

Since we're not setting this to the actual value, what do you think about renaming this to something like USE_PERSISTENT_DATABASE_CONNECTIONS?

@@ -87,3 +87,6 @@
"Transcribed and reviewed by volunteers participating in the "
"By The People project at crowd.loc.gov."
)

if os.getenv("USE_PERSISTENT_DATABASE_CONNECTIONS"):
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we want to explicitly test here since we don't otherwise define this value but it might be a good future-proofing move:

Suggested change
if os.getenv("USE_PERSISTENT_DATABASE_CONNECTIONS"):
if os.getenv("USE_PERSISTENT_DATABASE_CONNECTIONS") == "1":

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.55% when pulling 864206d on ecs-conn-max-age into e49b1da on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.55% when pulling 864206d on ecs-conn-max-age into e49b1da on master.

@rstorey rstorey merged commit 7535690 into master Mar 29, 2019
@rstorey rstorey deleted the ecs-conn-max-age branch March 29, 2019 19:43
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.

None yet

3 participants