fix 目录监控已处理逻辑
This commit is contained in:
parent
b899b23d04
commit
44d4bcdd19
@ -69,9 +69,6 @@ class DirMonitor(_PluginBase):
|
|||||||
# 可使用的用户级别
|
# 可使用的用户级别
|
||||||
auth_level = 1
|
auth_level = 1
|
||||||
|
|
||||||
# 已处理的文件清单
|
|
||||||
_synced_files = []
|
|
||||||
|
|
||||||
# 私有属性
|
# 私有属性
|
||||||
_scheduler = None
|
_scheduler = None
|
||||||
transferhis = None
|
transferhis = None
|
||||||
@ -193,9 +190,8 @@ class DirMonitor(_PluginBase):
|
|||||||
|
|
||||||
# 全程加锁
|
# 全程加锁
|
||||||
with lock:
|
with lock:
|
||||||
if event_path not in self._synced_files:
|
transfer_history = self.transferhis.get_by_src(event_path)
|
||||||
self._synced_files.append(event_path)
|
if transfer_history:
|
||||||
else:
|
|
||||||
logger.debug("文件已处理过:%s" % event_path)
|
logger.debug("文件已处理过:%s" % event_path)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user