We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e390278 commit fe67185Copy full SHA for fe67185
1 file changed
feapder/utils/redis_lock.py
@@ -62,7 +62,7 @@ def __enter__(self):
62
if self.locked:
63
# 延长锁的时间
64
thread = threading.Thread(target=self.prolong_life)
65
- thread.setDaemon(True)
+ thread.daemon = True
66
thread.start()
67
return self
68
@@ -83,11 +83,12 @@ def acquire(self):
83
84
if self.wait_timeout > 0:
85
if time.time() - start > self.wait_timeout:
86
- log.info("加锁失败")
+ log.debug("获取锁失败")
87
break
88
else:
89
90
- log.debug("等待加锁: {} wait:{}".format(self, time.time() - start))
91
+ log.debug("等待锁: {} wait:{}".format(self, time.time() - start))
92
if self.wait_timeout > 10:
93
time.sleep(5)
94
0 commit comments