summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/utils.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index aae2783c7..6183cdc49 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -88,11 +88,13 @@ def fake_task(*args):
return fake
+task = fake_task
if settings.USE_BACKGROUND_TASK:
- from celery import shared_task
- task = shared_task
-else:
- task = fake_task
+ try:
+ from celery import shared_task
+ task = shared_task
+ except ImportError:
+ pass
class BColors: