|
@@ -223,10 +223,13 @@ class Cache:
|
|
|
def get_pjsua_thread_lock(self):
|
|
|
minute = datetime.now().strftime('%Y%m%d%H%M')
|
|
|
key = BOT_PJSUA_THREAD_LOCK % minute
|
|
|
- return self.redis_handler.redis.get(key)
|
|
|
+ _lock = self.redis_handler.redis.get(key)
|
|
|
+ self.logger.info("get_pjsua_thread_lock %s", _lock)
|
|
|
+ return _lock
|
|
|
|
|
|
- def set_pjsua_thread_lock(self, expire=60):
|
|
|
+ def set_pjsua_thread_lock(self, expire=60*3):
|
|
|
minute = datetime.now().strftime('%Y%m%d%H%M')
|
|
|
key = BOT_PJSUA_THREAD_LOCK % minute
|
|
|
+ self.logger.info("set_pjsua_thread_lock")
|
|
|
return self.redis_handler.redis.set(key, "1", ex=expire, nx=True)
|
|
|
|