Skip to content

Commit 819a2d8

Browse files
committed
🔧(backend) allow to configure psycopg pool timeout
We want to allow the configuration of the psycopg pool timeout. For this we created a new setting DB_PSYCOPG_POOL_TIMEOUT
1 parent 60942c9 commit 819a2d8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/env.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ These are the environment variables you can set for the `impress-backend` contai
4848
| DB_PORT | Port of the database | 5432 |
4949
| DB_PSYCOPG_POOL_MIN_SIZE | The psycopg min pool size | 4 |
5050
| DB_PSYCOPG_POOL_MAX_SIZE | The psycopg max pool size | None |
51+
| DB_PSYCOPG_POOL_TIMEOUT | The default maximum time in seconds that a client can wait to receive a connection from the pool | 3 |
5152
| DB_USER | User to authenticate with | dinum |
5253
| DJANGO_ALLOWED_HOSTS | Allowed hosts | [] |
5354
| DJANGO_CELERY_BROKER_TRANSPORT_OPTIONS | Celery broker transport options | {} |

src/backend/impress/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ class Base(Configuration):
110110
environ_name="DB_PSYCOPG_POOL_MAX_SIZE",
111111
environ_prefix=None,
112112
),
113+
"timeout": values.IntegerValue(
114+
3,
115+
environ_name="DB_PSYCOPG_POOL_TIMEOUT",
116+
environ_prefix=None,
117+
),
113118
}
114119
},
115120
}

0 commit comments

Comments
 (0)