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
Conversation
There was a problem hiding this 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.
concordia/settings_ecs.py
Outdated
@@ -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"): |
There was a problem hiding this comment.
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"): |
There was a problem hiding this comment.
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:
if os.getenv("USE_PERSISTENT_DATABASE_CONNECTIONS"): | |
if os.getenv("USE_PERSISTENT_DATABASE_CONNECTIONS") == "1": |
No description provided.