mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-16 19:59:24 +08:00
Import server side cursor setting from .env
This commit is contained in:
parent
c74b339929
commit
24233506c4
2 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ DB_PASSWORD = ''
|
|||
DB_HOST = 'postgres'
|
||||
DB_PORT = '5432'
|
||||
DB_SSL_MODE = 'disable'
|
||||
DB_DISABLE_SERVER_SIDE_CURSORS = 'False' # If you're using an external connection bouncer (eg. PgBouncer), set this to True
|
||||
|
||||
# Redis
|
||||
# Used for DB cache and Celery broker
|
||||
|
|
|
@ -227,7 +227,7 @@ DATABASES = {
|
|||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
# Set to True to avoid issues with pgbouncer when pooling connections
|
||||
'DISABLE_SERVER_SIDE_CURSORS': True,
|
||||
'DISABLE_SERVER_SIDE_CURSORS': get_secret("DB_DISABLE_SERVER_SIDE_CURSORS"),
|
||||
"NAME": get_secret("DB_DATABASE"),
|
||||
"USER": get_secret("DB_USERNAME"),
|
||||
"PASSWORD": get_secret("DB_PASSWORD"),
|
||||
|
|
Loading…
Reference in a new issue