feat: add DB connection pooling

This commit is contained in:
Markos Gogoulos
2025-07-07 11:18:40 +03:00
committed by GitHub
parent e8520bc7cd
commit d54732040a
3 changed files with 3 additions and 11 deletions

View File

@ -376,16 +376,7 @@ LOGGING = {
},
}
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "mediacms",
"HOST": "127.0.0.1",
"PORT": "5432",
"USER": "mediacms",
"PASSWORD": "mediacms",
}
}
DATABASES = {"default": {"ENGINE": "django.db.backends.postgresql", "NAME": "mediacms", "HOST": "127.0.0.1", "PORT": "5432", "USER": "mediacms", "PASSWORD": "mediacms", "OPTIONS": {'pool': True}}}
REDIS_LOCATION = "redis://127.0.0.1:6379/1"

View File

@ -13,6 +13,7 @@ DATABASES = {
"PORT": os.getenv('POSTGRES_PORT', '5432'),
"USER": os.getenv('POSTGRES_USER', 'mediacms'),
"PASSWORD": os.getenv('POSTGRES_PASSWORD', 'mediacms'),
"OPTIONS": {'pool': True},
}
}

View File

@ -2,7 +2,7 @@ Django==5.1.6
djangorestframework==3.15.2
python3-saml==1.16.0
django-allauth==65.4.1
psycopg==3.2.4
psycopg[pool]==3.2.4
uwsgi==2.0.28
django-redis==5.4.0
celery==5.4.0