Replace task decorator with shared_task in openedx

This commit is contained in:
Soban Javed
2020-12-29 13:38:52 +05:00
parent 3d19ee8272
commit 5199bf7acb
13 changed files with 32 additions and 32 deletions

View File

@@ -4,7 +4,7 @@
from unittest import TestCase
from pytest import mark
from celery.task import task
from celery import shared_task
from django.test.utils import override_settings
from edx_django_utils.cache import RequestCache
@@ -17,7 +17,7 @@ class TestClearRequestCache(TestCase):
def _get_cache(self):
return RequestCache("TestClearRequestCache")
@task
@shared_task
def _dummy_task(self):
""" A task that adds stuff to the request cache. """
self._get_cache().set("cache_key", "blah blah")