From ada2568494557546583345eb3ac69e03991da8f9 Mon Sep 17 00:00:00 2001 From: David Burke Date: Fri, 29 Aug 2014 14:16:33 -0400 Subject: [PATCH] Used shared_task decorator for better compatibility --- django_cached_field/tasks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/django_cached_field/tasks.py b/django_cached_field/tasks.py index d26ee1f..adb2c06 100644 --- a/django_cached_field/tasks.py +++ b/django_cached_field/tasks.py @@ -1,4 +1,4 @@ -from celery import task +from celery import shared_task from celery.utils.log import get_task_logger from django.db.models import get_model import re @@ -7,8 +7,7 @@ logger = get_task_logger(__name__) recalc_needed_re = re.compile("(.*)_recalculation_needed$") - -@task +@shared_task def offload_cache_recalculation(app, model, obj_id, **kwargs): model = get_model(app,model) try: