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

DEV-1472 post-zephir processing: get database config from env vars #63

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

Conversation

moseshll
Copy link
Contributor

  • Move all Perl DB connection code to a single module under perl_lib
  • Remove config/database.yml
  • Add necessary MARIADB_HT... and MARIADB_RIGHTS... vars to docker compose.

- Move all Perl DB connection code to a single module under `perl_lib`
- Remove config/database.yml
- Add necessary `MARIADB_HT...` and `MARIADB_RIGHTS...` vars to docker compose.
@moseshll moseshll requested a review from aelkiss January 20, 2025 19:53
Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

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

This all looks right to me. Note that we will need to get https://hathitrust.atlassian.net/browse/DEV-1471 done and merged before deploying this.


my $sdr_dbh;
$sdr_dbh = DBI->connect( "DBI:MariaDB:$db_name:$db_server", $db_user, $db_passwd,
{ RaiseError => 0, AutoCommit => 1 } ) || die "Cannot connect: $DBI::errstr";
Copy link
Member

Choose a reason for hiding this comment

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

Just noting that the move removes the AutoCommit => 1, but that should be fine as this code is only using the read-only connection (and we weren't previously using autocommit for the read-write stuff)

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