updated settings

This commit is contained in:
Alexander Karpov 2023-10-25 10:42:08 +03:00
parent 59fc828097
commit e4bfd5ca07
2 changed files with 5 additions and 8 deletions

View File

@ -5,6 +5,7 @@
import environ import environ
import structlog import structlog
from sentry_sdk.integrations.celery import CeleryIntegration
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# akarpov/ # akarpov/
@ -483,7 +484,7 @@
"SERVE_INCLUDE_SCHEMA": False, "SERVE_INCLUDE_SCHEMA": False,
"SERVERS": [ "SERVERS": [
{"url": "http://127.0.0.1:8000", "description": "Local Development server"}, {"url": "http://127.0.0.1:8000", "description": "Local Development server"},
{"url": "https://akarpov.ru", "description": "Production server"}, {"url": "https://new.akarpov.ru", "description": "Production server"},
], ],
} }
@ -587,5 +588,6 @@
signals_spans=True, signals_spans=True,
cache_spans=True, cache_spans=True,
), ),
CeleryIntegration(monitor_beat_tasks=True, propagate_traces=True),
], ],
) )

View File

@ -52,14 +52,9 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://django-extensions.readthedocs.io/en/latest/installation_instructions.html#configuration # https://django-extensions.readthedocs.io/en/latest/installation_instructions.html#configuration
INSTALLED_APPS += ["django_extensions"] # noqa F405 INSTALLED_APPS += ["django_extensions"] # noqa F405
# Celery
# ------------------------------------------------------------------------------
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#task-eager-propagates
CELERY_TASK_EAGER_PROPAGATES = True
# SHORTENER # SHORTENER
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
SHORTENER_REDIRECT_TO = "https://dev2.akarpov.ru" SHORTENER_REDIRECT_TO = env("SHORTENER_REDIRECT_TO", default="http://127.0.0.1:8000")
SHORTENER_HOST = "https://dev.akarpov.ru" SHORTENER_HOST = env("SHORTENER_HOST", default="http://127.0.0.1:8000")