Add setting to disable extra TLS config for Celery broker connection

This commit is contained in:
Kyle Lacy 2023-04-15 12:32:54 -07:00
parent 6af54ebbe7
commit f757d8232b
No known key found for this signature in database
GPG Key ID: 82616D2392FB6605

View File

@ -239,8 +239,12 @@ SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN", False)
LOGGER_BASE_URL = os.environ.get("LOGGER_BASE_URL", False)
broker_ssl = os.environ.get("REDIS_BROKER_SSL", "1") == "1"
redis_url = os.environ.get("REDIS_URL")
if broker_ssl:
broker_url = f"{redis_url}?ssl_cert_reqs={ssl.CERT_NONE.name}&ssl_ca_certs={certifi.where()}"
else:
broker_url = redis_url
CELERY_RESULT_BACKEND = broker_url
CELERY_BROKER_URL = broker_url