Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/worker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ test:
pytest --cov=./ --junitxml=junit.xml -o junit_family=legacy -c pytest.ini --rootdir=${PYTEST_ROOTDIR}

shell:
docker-compose exec worker bash
docker compose exec worker bash
12 changes: 0 additions & 12 deletions apps/worker/celery_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from celery_task_router import route_task
from helpers.clock import get_utc_now_as_iso_format
from helpers.health_check import get_health_check_interval_seconds
from helpers.sentry import initialize_sentry, is_sentry_enabled
from shared.celery_config import (
BaseCeleryConfig,
brolly_stats_rollup_task_name,
Expand Down Expand Up @@ -53,17 +52,6 @@ def initialize_cache(**kwargs):
cache.configure(redis_cache_backend)


@signals.worker_process_init.connect
def initialize_sentry_for_worker_process(**kwargs):
"""Initialize Sentry in each forked worker process.

Celery workers fork from the main process, so Sentry must be re-initialized
in each worker to ensure proper error tracking and trace propagation.
"""
if is_sentry_enabled():
initialize_sentry()


@signals.worker_shutting_down.connect
def flush_sentry_on_shutdown(**kwargs):
"""Flush pending Sentry events before worker shutdown.
Expand Down
Loading