mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-12 16:02:35 +08:00
fix(queue): handle queue.Empty instead of TimeoutError on timeout
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import platform
|
import platform
|
||||||
|
import queue
|
||||||
import re
|
import re
|
||||||
import threading
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
@@ -242,7 +243,7 @@ class Monitor(metaclass=Singleton):
|
|||||||
self.__handle_file(storage=item.get("storage"),
|
self.__handle_file(storage=item.get("storage"),
|
||||||
event_path=item.get("filepath"),
|
event_path=item.get("filepath"),
|
||||||
mon_path=item.get("mon_path"))
|
mon_path=item.get("mon_path"))
|
||||||
except TimeoutError:
|
except queue.Empty:
|
||||||
continue
|
continue
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"整理队列处理出现错误:{e}")
|
logger.error(f"整理队列处理出现错误:{e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user