diff options
author | Huang Haibin <haibin.huang@intel.com> | 2018-02-28 17:54:28 +0800 |
---|---|---|
committer | Huang Haibin <haibin.huang@intel.com> | 2018-03-01 03:50:22 +0800 |
commit | c412b24619912b059bd748c0ed91c0a40ef71d2b (patch) | |
tree | 4866dbae3df9b7c7ef2eac48071d1ab0642a5cc0 /share/common/utils/share_lock.py | |
parent | b14e1359642e17daf769ca39fa01e644135191f0 (diff) |
settings.py replace config.py
the patch refer to https://gerrit.onap.org/r/#/c/23529
Change-Id: Ia42c9be995ef73ea12a4733cb967ffed1ce15101
Issue-ID: MULTICLOUD-138
Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'share/common/utils/share_lock.py')
-rw-r--r-- | share/common/utils/share_lock.py | 6 |
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) |