-
-
Notifications
You must be signed in to change notification settings - Fork 316
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 support for CONN_HEALTH_CHECKS and OPTIONS #413
Comments
Implemented in #418. Thank you for contributing! |
@denys-pidlisnyi @sergeyklay https://docs.djangoproject.com/en/4.1/ref/databases/#isolation-level |
Feel free to make a PR :) |
To be honestly, I use another package, this is my current
I just commented because of you closed this issue (may be by mistake) but only half of issue was fixed... May be it should stay open but it's up to you... |
I wonder - are those changes really needed? Here's example code for adding non-standard params to DB configuration: DATABASES = {
'default': {
**env.db_url(),
'CONN_MAX_AGE': None,
'CONN_HEALTH_CHECKS': True,
'TEST': {
'MIGRATE': False
}
}
}
|
@sergeyklay it would be useful if you could bump the package version and release it so that this change is available on PyPi |
@Bensge I'm on this track. |
Looks like django-environ/environ/environ.py Lines 590 to 597 in df301b6
@lorddaedra: fancy to close the issue? Also, I think @stat1c-void smart trick is worth a "tips" section snippet. I'll get to it as soon as I have some more time (unless someone beats to me at it 😄). |
About trick: yes, it's useful workaround (but I usually prefer modern style https://peps.python.org/pep-0584/ ) About options: may be we should add Can we somehow do not hardcode them but load on app start instead? |
Thanks for the trick, @lorddaedra! I didn't knew about it. |
I agree with you, we can open new issue if needed for There is nothing special with them. |
Hello!
How to convert my config to django-environ? I'm worry about CONN_HEALTH_CHECKS and OPTIONS.
Names like
CONN_MAX_AGE
are hardcoded in https://github.com/joke2k/django-environ/blob/main/environ/environ.py#L132-L137...The text was updated successfully, but these errors were encountered: