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

Add logic to construct connection string or params #41

Open
AlanCoding opened this issue Jan 9, 2025 · 2 comments
Open

Add logic to construct connection string or params #41

AlanCoding opened this issue Jan 9, 2025 · 2 comments
Labels
refactoring code build-out and clean-up

Comments

@AlanCoding
Copy link
Member

Currently, this library expects the user to provide a valid set of kwargs to pass directly to the psycopg library connect method, or any of the connection classes (all the same anyway).

However, the dispatcher should adopt the logic that AWX has to do this. This requires having the Django and psycopg dependencies installed, so it would be pg_notify specific.

This logic exists in:

https://github.com/ansible/awx/blob/devel/awx/main/dispatch/__init__.py

The idea is that we would get the listener connection info from Django settings values, DATABASES and LISTENER_DATABASES, and that the dispatcher library would standardize this practice. This is another argument for having a small Django test app to test against.

@AlanCoding
Copy link
Member Author

Related to ansible/awx#15736

@AlanCoding AlanCoding added the refactoring code build-out and clean-up label Jan 16, 2025
@AlanCoding
Copy link
Member Author

Related to ansible/django-ansible-base#686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring code build-out and clean-up
Projects
None yet
Development

No branches or pull requests

1 participant