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: