Skip to content

Commit

Permalink
#2041 - Patch celery for ddtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
MackHalliday committed Nov 19, 2024
1 parent 335c349 commit 107d306
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/celery/celery.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import time

from celery import Celery, Task
import celery
from celery import Task
from celery.signals import worker_process_shutdown, worker_shutting_down, worker_process_init
from flask import current_app

from ddtrace import patch

patch(celery=True)


@worker_process_init.connect
def pool_worker_started(
Expand Down Expand Up @@ -78,7 +83,7 @@ def __call__(
return NotifyTask


class NotifyCelery(Celery):
class NotifyCelery(celery.Celery):
def init_app(
self,
app,
Expand Down

0 comments on commit 107d306

Please sign in to comment.