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

Clean up load_configuration methods in *_database #946

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Oct 18, 2024

This refactors load_configuration to return a simple hash and do the caching in the method configuration. It then also uses URI and CGI to parse the Candlepin DB URL instead of using regular expressions.

@configuration['password'] = db_config['PASSWORD']
@configuration
{
'adapter' => 'postgresql',
Copy link
Member Author

Choose a reason for hiding this comment

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

We never use this, so why do we need this?

Copy link
Member

Choose a reason for hiding this comment

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

can be dropped, I guess

Comment on lines +48 to 53
'ssl' => query['ssl']&.first == 'true',
'sslfactory' => query['sslfactory']&.first,
'driver_class' => full_config['jpa.config.hibernate.connection.driver_class'],
Copy link
Member Author

Choose a reason for hiding this comment

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

We never use these, so why do we have these?

Copy link
Member

Choose a reason for hiding this comment

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

pretty sure we don't need them and can drop 'em

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