Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit c6e766f

Browse files
author
Dave Hunter
committed
import get_client within celery task
1 parent ea92d95 commit c6e766f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

raven/contrib/django/celery/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
from raven.contrib.celery import CeleryMixin
1111
from raven.contrib.django.client import DjangoClient
12-
from raven.contrib.django.models import get_client
1312
try:
1413
from celery.task import task
1514
except ImportError:
@@ -28,9 +27,11 @@ def send_encoded(self, *args, **kwargs):
2827

2928
@task(routing_key='sentry')
3029
def send_raw_integrated(kwargs):
30+
from raven.contrib.django.models import get_client
3131
super(DjangoClient, get_client()).send_integrated(kwargs)
3232

3333

3434
@task(routing_key='sentry')
3535
def send_raw(*args, **kwargs):
36+
from raven.contrib.django.models import get_client
3637
super(DjangoClient, get_client()).send_encoded(*args, **kwargs)

0 commit comments

Comments
 (0)