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

pkg/sqlutil/pg: create package; expand env config #450

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

jmank88
Copy link
Collaborator

@jmank88 jmank88 commented Apr 4, 2024

pkg/loop/config.go Outdated Show resolved Hide resolved
@@ -150,3 +196,27 @@ func getDatabaseURL() (*url.URL, error) {
}
return u, nil
}

func getDatabaseIdleInTxSessionTimeout() (time.Duration, error) {
return time.ParseDuration(os.Getenv(envDatabaseDefaultIdleInTxSessionTimeout))
Copy link
Contributor

Choose a reason for hiding this comment

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

do these need default values? if i'm reading the code correctly, i think this will error if the env vars aren't set? are we assuming that the core node sets them? if so, i think we need a comment somewhere in this repo, probably where they are defined, and a test integration test to ensure all the value are coming through the env correctly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are only required if the DB URL is included. Yeah the dummy plugin on the core side is meant to address it.

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

2 participants