Skip to content

Commit 71ce5b7

Browse files
committed
health checks not supported
1 parent 5d6c38e commit 71ce5b7

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ MONGODB_URI = "mongodb+srv://myDatabaseUser:D1fficultP%[email protected]
131131
DATABASES["default"] = django_mongodb.parse_uri(MONGODB_URI)
132132
```
133133

134-
#### `django_mongodb.parse_uri(uri, conn_max_age=0, conn_health_checks=False, test=None)`
134+
#### `django_mongodb.parse_uri(uri, conn_max_age=0, test=None)`
135135

136-
- Use `conn_max_age` and `conn_health_checks` to configure [persistent database
137-
connections](https://docs.djangoproject.com/en/stable/ref/databases/#persistent-database-connections).
136+
- Use `conn_max_age` to configure [persistent database connections](
137+
https://docs.djangoproject.com/en/stable/ref/databases/#persistent-database-connections).
138138
- Use `test` to provide a dictionary of [settings for test databases](
139139
https://docs.djangoproject.com/en/stable/ref/settings/#test).
140140

django_mongodb/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def check_django_compatability():
2626
)
2727

2828

29-
def parse_uri(uri, conn_max_age=0, conn_health_checks=False, test=None):
29+
def parse_uri(uri, conn_max_age=0, test=None):
3030
"""
3131
Convert the given uri into a dictionary suitable for Django's DATABASES
3232
setting.
@@ -52,7 +52,6 @@ def parse_uri(uri, conn_max_age=0, conn_health_checks=False, test=None):
5252
"PASSWORD": uri.get("password"),
5353
"OPTIONS": uri.get("options"),
5454
"CONN_MAX_AGE": conn_max_age,
55-
"CONN_HEALTH_CHECKS": conn_health_checks,
5655
}
5756
if test:
5857
settings_dict["TEST"] = test

tests/utils_/test_parse_uri.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ def test_conn_max_age(self):
6262
settings_dict = parse_uri("mongodb://localhost/myDatabase", conn_max_age=600)
6363
self.assertEqual(settings_dict["CONN_MAX_AGE"], 600)
6464

65-
def test_conn_health_checks(self):
66-
settings_dict = parse_uri("mongodb://localhost/myDatabase", conn_health_checks=True)
67-
self.assertEqual(settings_dict["CONN_HEALTH_CHECKS"], True)
68-
6965
def test_test_kwarg(self):
7066
settings_dict = parse_uri("mongodb://localhost/myDatabase", test={"NAME": "test_db"})
7167
self.assertEqual(settings_dict["TEST"]["NAME"], "test_db")

0 commit comments

Comments
 (0)