Commit a48bb27898939175e6a4f81554dc9c8218248ff4
1 parent
1b21cac6
Exists in
master
and in
14 other branches
Using redis connection from celery to create locks
Signed-off-by: Alexandre Barbosa <alexandreab@live.com> Signed-off-by: Athos Ribeiro <athoscribeiro@gmail.com> Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
colab/plugins/data/tasks.py
... | ... | @@ -16,7 +16,7 @@ TASKS = set() |
16 | 16 | def lock(method, name): |
17 | 17 | def wrapped_method(self, *args, **kwargs): |
18 | 18 | lock_id = 'colab-data-importer-{}'.format(name) |
19 | - lock = redis.Redis().lock(lock_id) | |
19 | + lock = app.backend.client.lock(lock_id) | |
20 | 20 | |
21 | 21 | if lock.acquire(blocking=False): |
22 | 22 | try: | ... | ... |