Skip to content

Commit

Permalink
fix(queue): handle queue.Empty instead of TimeoutError on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
InfinityPacer committed Sep 24, 2024
1 parent 8839400 commit 6d55db4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/monitor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import platform
import queue
import re
import threading
import traceback
Expand Down Expand Up @@ -242,7 +243,7 @@ def __start_transfer(self):
self.__handle_file(storage=item.get("storage"),
event_path=item.get("filepath"),
mon_path=item.get("mon_path"))
except TimeoutError:
except queue.Empty:
continue
except Exception as e:
logger.error(f"整理队列处理出现错误:{e}")
Expand Down

0 comments on commit 6d55db4

Please sign in to comment.