From 44d4bcdd19c17fce754563b3b805fc633f2c4563 Mon Sep 17 00:00:00 2001 From: thsrite Date: Thu, 7 Sep 2023 10:16:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=9B=AE=E5=BD=95=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E5=B7=B2=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/dirmonitor/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/plugins/dirmonitor/__init__.py b/app/plugins/dirmonitor/__init__.py index 48ab6ecd..70be7087 100644 --- a/app/plugins/dirmonitor/__init__.py +++ b/app/plugins/dirmonitor/__init__.py @@ -69,9 +69,6 @@ class DirMonitor(_PluginBase): # 可使用的用户级别 auth_level = 1 - # 已处理的文件清单 - _synced_files = [] - # 私有属性 _scheduler = None transferhis = None @@ -193,9 +190,8 @@ class DirMonitor(_PluginBase): # 全程加锁 with lock: - if event_path not in self._synced_files: - self._synced_files.append(event_path) - else: + transfer_history = self.transferhis.get_by_src(event_path) + if transfer_history: logger.debug("文件已处理过:%s" % event_path) return