Commit 713d42836a1366bf3d29a50b40c62082b9b55150
Exists in
dev
Merge branch 'dev' of https://gitlab.irap.omp.eu/epallier/pyros into dev
Showing
3 changed files
with
14 additions
and
2 deletions
Show diff stats
config/devices/device_FLI_Kepler4040_noshutter_generic.yml
install/requirements.txt
src/core/pyros_django/pyros/settings.py
... | ... | @@ -326,6 +326,14 @@ if MYSQL: |
326 | 326 | 'USER': SQL_USER, |
327 | 327 | 'PASSWORD': SQL_PWD, |
328 | 328 | 'PORT': MYSQL_PORT, |
329 | + # By default, Django creates a new connexion for each request | |
330 | + # For optimization, it is better to have "persistent" connexions by setting this timeout to a value greater than zero | |
331 | + # (BUT : We had initially set this to zero to be sure that a child process had not the same connexion as its parent) | |
332 | + # - Not persistant | |
333 | + #CONN_MAX_AGE = 0 | |
334 | + # - Always persistant | |
335 | + #CONN_MAX_AGE = None | |
336 | + 'CONN_MAX_AGE': 500, | |
329 | 337 | ''' |
330 | 338 | (See https://docs.djangoproject.com/fr/2.1/topics/testing/overview/#the-test-database) |
331 | 339 | Optional, but this allows to remember the default django test database name |
... | ... | @@ -354,7 +362,7 @@ else: |
354 | 362 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
355 | 363 | } |
356 | 364 | } |
357 | -CONN_MAX_AGE = 0 | |
365 | + | |
358 | 366 | # New in Django 3.2 : we have to tell that we want auto field for id |
359 | 367 | DEFAULT_AUTO_FIELD='django.db.models.AutoField' |
360 | 368 | # SIMULATOR==True ==> 'TEST (simu)' RUN MODE, use pyros_test database | ... | ... |