diff --git a/recommends/tasks.py b/recommends/tasks.py index 1ae08af..c147842 100644 --- a/recommends/tasks.py +++ b/recommends/tasks.py @@ -1,4 +1,5 @@ -from celery.task import task, periodic_task +from celery import shared_task +from celery.task import periodic_task from celery.schedules import crontab from .utils import filelock @@ -34,7 +35,7 @@ def _recommends_precompute(): recommends_precompute() -@task(name='remove_suggestions') +@shared_task(name='remove_suggestions') def remove_suggestions(rated_model, object_id): from django.apps import apps from recommends.providers import recommendation_registry @@ -47,7 +48,7 @@ def remove_suggestions(rated_model, object_id): provider_instance.storage.remove_recommendations(obj) -@task(name='remove_similarities') +@shared_task(name='remove_similarities') def remove_similarities(rated_model, object_id): from django.apps import apps from recommends.providers import recommendation_registry diff --git a/requirements.txt b/requirements.txt index 9dacb4f..14f0d49 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ Django>=1.7 -celery>=3.0,<5.0 +celery>=4.0,<6.0 python-dateutil>=2.1