summaryrefslogtreecommitdiff
path: root/chimere/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/tasks.py')
-rw-r--r--chimere/tasks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/chimere/tasks.py b/chimere/tasks.py
index 1d55d2d..2d55bfd 100644
--- a/chimere/tasks.py
+++ b/chimere/tasks.py
@@ -22,6 +22,7 @@ if 'kombu.transport.django' in settings.INSTALLED_APPS \
and 'djcelery' in settings.INSTALLED_APPS:
from celery.decorators import task
+from django.core.cache import cache
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext_lazy as _
@@ -44,7 +45,7 @@ if 'task' in globals():
release_lock = lambda: cache.delete(lock_id)
if acquire_lock():
try:
- func()
+ func(*args, **kwargs)
finally:
release_lock()
return wrapper