Skip to content

Commit

Permalink
refactor prod settings
Browse files Browse the repository at this point in the history
  • Loading branch information
awieckowski committed Dec 10, 2024
1 parent c3447ad commit b013e6b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ralph/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@
'ralph.lib.metrics.middlewares.RequestMetricsMiddleware',
) + MIDDLEWARE

if bool_from_env('PROMETHEUS_METRICS_ENABLED'):
PROMETHEUS_METRICS_ENABLED = True
MIDDLEWARE = (
'django_prometheus.middleware.PrometheusBeforeMiddleware',
) + MIDDLEWARE
MIDDLEWARE = MIDDLEWARE + (
'django_prometheus.middleware.PrometheusAfterMiddleware',
)

ALLOW_PUSH_GRAPHS_DATA_TO_STATSD = bool_from_env(
'ALLOW_PUSH_GRAPHS_DATA_TO_STATSD'
)
if ALLOW_PUSH_GRAPHS_DATA_TO_STATSD:
STATSD_GRAPHS_PREFIX = os.environ.get(
'STATSD_GRAPHS_PREFIX', 'ralph.graphs'
)

if bool_from_env('PROMETHEUS_METRICS_ENABLED'):
PROMETHEUS_METRICS_ENABLED = True
MIDDLEWARE = (
'django_prometheus.middleware.PrometheusBeforeMiddleware',
) + MIDDLEWARE
MIDDLEWARE = MIDDLEWARE + (
'django_prometheus.middleware.PrometheusAfterMiddleware',
)

0 comments on commit b013e6b

Please sign in to comment.