Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

feat: add dd to celery #4155

Closed
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
14 changes: 12 additions & 2 deletions ecommerce/celery_app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@


import os

from celery import Celery

# TEMP: This code will be removed by ARCH-BOM on 4/22/24
# ddtrace allows celery task logs to be traced by the dd agent.
# TODO: remove this code.
try:
from ddtrace import patch
except ImportError:
pass
try:
patch(celery=True)
except NameError:
pass

# Set the default configuration module, if one is not aleady defined.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce.settings.local')

Expand Down
Loading