Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerrrqw committed Nov 15, 2024
1 parent a3e62f6 commit a839300
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions {{cookiecutter.project_slug}}/config/settings/production.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# ruff: noqa: E501
import logging # 표준 라이브러리
import ssl # 표준 라이브러리

{% if cookiecutter.use_sentry == 'y' -%}
import sentry_sdk # 서드파티 라이브러리
import logging

{%- if cookiecutter.use_celery == 'y' %}
import sentry_sdk

{%- if cookiecutter.use_celery == 'y' %}
from sentry_sdk.integrations.celery import CeleryIntegration

{%- endif %}
Expand Down Expand Up @@ -50,18 +48,21 @@
},
}


REDIS_URL = env("REDIS_TLS_URL")
CELERY_REDIS_BACKEND_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
CELERY_BROKER_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}

CERT_NONE = 0

CELERY_REDIS_BACKEND_USE_SSL = {"ssl_cert_reqs": CERT_NONE}
CELERY_BROKER_USE_SSL = {"ssl_cert_reqs": CERT_NONE}
REDIS_SSL = env.bool("REDIS_SSL", default=False)
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True

if REDIS_SSL:
CACHES["default"]["OPTIONS"]["CONNECTION_POOL_CLASS"] = (
"redis.connection.SSLConnection"
)
CACHES["default"]["OPTIONS"]["SSL_CERT_REQS"] = None
CACHES["default"]["OPTIONS"]["SSL_CERT_REQS"] = CERT_NONE

# SECURITY
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header
Expand Down

0 comments on commit a839300

Please sign in to comment.