From 0102f1d693271d3a094f14505d70642c8fdf5c93 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:07:54 +0530 Subject: [PATCH] fix: psycopg errors (#1568) --- apiserver/bin/takeoff | 2 +- apiserver/plane/settings/local.py | 2 +- apiserver/plane/settings/production.py | 2 +- apiserver/plane/settings/staging.py | 2 +- apiserver/requirements/base.txt | 2 ++ apiserver/requirements/production.txt | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apiserver/bin/takeoff b/apiserver/bin/takeoff index d22eceb6e..dc25a14e2 100755 --- a/apiserver/bin/takeoff +++ b/apiserver/bin/takeoff @@ -6,4 +6,4 @@ python manage.py migrate # Create a Default User python bin/user_script.py -exec gunicorn -w 8 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --config gunicorn.config.py --max-requests 1200 --max-requests-jitter 1000 --access-logfile - +exec gunicorn -w 8 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --max-requests 1200 --max-requests-jitter 1000 --access-logfile - diff --git a/apiserver/plane/settings/local.py b/apiserver/plane/settings/local.py index 194b2629f..9d293c019 100644 --- a/apiserver/plane/settings/local.py +++ b/apiserver/plane/settings/local.py @@ -17,7 +17,7 @@ EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" DATABASES = { "default": { - "ENGINE": "django.db.backends.postgresql_psycopg2", + "ENGINE": "django.db.backends.postgresql", "NAME": os.environ.get("PGUSER", "plane"), "USER": "", "PASSWORD": "", diff --git a/apiserver/plane/settings/production.py b/apiserver/plane/settings/production.py index 98e22bcbd..2f2104397 100644 --- a/apiserver/plane/settings/production.py +++ b/apiserver/plane/settings/production.py @@ -17,7 +17,7 @@ DEBUG = int(os.environ.get("DEBUG", 0)) == 1 DATABASES = { "default": { - "ENGINE": "django.db.backends.postgresql_psycopg2", + "ENGINE": "django.db.backends.postgresql", "NAME": "plane", "USER": os.environ.get("PGUSER", ""), "PASSWORD": os.environ.get("PGPASSWORD", ""), diff --git a/apiserver/plane/settings/staging.py b/apiserver/plane/settings/staging.py index daf8f974b..5e274f8f3 100644 --- a/apiserver/plane/settings/staging.py +++ b/apiserver/plane/settings/staging.py @@ -16,7 +16,7 @@ from .common import * # noqa DEBUG = int(os.environ.get("DEBUG", 1)) == 1 DATABASES = { "default": { - "ENGINE": "django.db.backends.postgresql_psycopg2", + "ENGINE": "django.db.backends.postgresql", "NAME": os.environ.get("PGUSER", "plane"), "USER": "", "PASSWORD": "", diff --git a/apiserver/requirements/base.txt b/apiserver/requirements/base.txt index 1eff57555..3421d9bb1 100644 --- a/apiserver/requirements/base.txt +++ b/apiserver/requirements/base.txt @@ -30,3 +30,5 @@ openai==0.27.8 slack-sdk==3.21.3 celery==5.3.1 django_celery_beat==2.5.0 +psycopg-binary==3.1.9 +psycopg-c==3.1.9 \ No newline at end of file diff --git a/apiserver/requirements/production.txt b/apiserver/requirements/production.txt index 30d9dc9bb..4da619d49 100644 --- a/apiserver/requirements/production.txt +++ b/apiserver/requirements/production.txt @@ -7,5 +7,5 @@ django-storages==1.13.2 boto3==1.27.0 django-anymail==10.0 django-debug-toolbar==4.1.0 -gevent==22.10.2 +gevent==23.7.0 psycogreen==1.0.2 \ No newline at end of file