From 6865cf4b54ae9e8ce2252cf32f93cbade8731f64 Mon Sep 17 00:00:00 2001 From: vamsi Date: Tue, 11 Apr 2023 00:04:03 +0530 Subject: [PATCH] chore: ssl config for REDIS connections to celery --- apiserver/plane/settings/staging.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apiserver/plane/settings/staging.py b/apiserver/plane/settings/staging.py index 1de2cfcbe..384116ba3 100644 --- a/apiserver/plane/settings/staging.py +++ b/apiserver/plane/settings/staging.py @@ -1,5 +1,7 @@ """Production settings and globals.""" from urllib.parse import urlparse +import ssl +import certifi import dj_database_url from urllib.parse import urlparse @@ -9,7 +11,6 @@ from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.redis import RedisIntegration from .common import * # noqa - # Database DEBUG = True DATABASES = { @@ -198,5 +199,8 @@ SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN", False) LOGGER_BASE_URL = os.environ.get("LOGGER_BASE_URL", False) -CELERY_RESULT_BACKEND = os.environ.get("REDIS_URL") -CELERY_BROKER_URL = os.environ.get("REDIS_URL") +redis_url = os.environ.get("REDIS_URL") +broker_url = f"{redis_url}?ssl_cert_reqs={ssl.CERT_NONE.name}&ssl_ca_certs={certifi.where()}" + +CELERY_RESULT_BACKEND = broker_url +CELERY_BROKER_URL = broker_url \ No newline at end of file