fixbug 100% cpu
This commit is contained in:
1 parent
f056da1dfc
commit
167ef235e6
3 files changed
+3
-3
No files matched your search
@@ -109,7 +109,7 @@ class LogClient:
|
||||
|
||||
while not self._stop.is_set():
|
||||
timeout = self._flush_interval - (time.monotonic() - last_flush)
|
||||
chk_timeout = max(0.0, min(timeout, 0.5))
|
||||
chk_timeout = max(0.1, min(timeout, 0.5))
|
||||
try:
|
||||
item = self._queue.get(timeout=chk_timeout)
|
||||
batch.append(item)
|
||||
|
||||
Reference in new issue
Block a user