summaryrefslogtreecommitdiffstats
path: root/share/common/utils/share_lock.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/common/utils/share_lock.py')
-rw-r--r--share/common/utils/share_lock.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/share/common/utils/share_lock.py b/share/common/utils/share_lock.py
index 7ffc7b47..45a2b50e 100644
--- a/share/common/utils/share_lock.py
+++ b/share/common/utils/share_lock.py
@@ -15,11 +15,13 @@ import time
import redis
-from common.config.config import REDIS_HOST, REDIS_PORT, REDIS_PASSWD
+from django.conf import settings
class SharedLock:
- def __init__(self, lock_key, host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWD, db=9, lock_timeout=5 * 60):
+ def __init__(self, lock_key, host=settings.REDIS_HOST,
+ port=settings.REDIS_PORT,
+ password=settings.REDIS_PASSWD, db=9, lock_timeout=5 * 60):
self.lock_key = lock_key
self.lock_timeout = lock_timeout
self.redis = redis.Redis(host=host, port=port, db=db, password=password)