6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-05 23:20:40 +00:00

fix: adds mongodb connect=False

Adding connect=False to the LMS and CMS' MongoDB connection to prevent
ServerSelectionError after a cluster failover.
This commit is contained in:
Paulo Viadanna 2023-09-26 17:42:56 -03:00 committed by Régis Behmo
parent 44e912b239
commit 06ad1978a4
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
[Improvement] Adds `connect=False` to the LMS and CMS' MongoDB connection to prevent `ServerSelectionError` after a cluster failover. (by @open-craft)

View File

@ -12,6 +12,7 @@ mongodb_parameters = {
"user": {% if MONGODB_USERNAME %}"{{ MONGODB_USERNAME }}"{% else %}None{% endif %},
"password": {% if MONGODB_PASSWORD %}"{{ MONGODB_PASSWORD }}"{% else %}None{% endif %},
# Connection/Authentication
"connect": False,
"ssl": {{ MONGODB_USE_SSL }},
"authsource": "{{ MONGODB_AUTH_SOURCE }}",
"replicaSet": {% if MONGODB_REPLICA_SET %}"{{ MONGODB_REPLICA_SET }}"{% else %}None{% endif %},