refactor: unify monitor history port access

This commit is contained in:
jxxghp
2026-08-24 04:59:45 +08:00
parent ae38e61880
commit 52c5c14f87
7 changed files with 38 additions and 7 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ from app.runtime.cache import TTLCache
from app.application.directory import DirectoryHelper
from app.application.history import (
HistoryGateAction,
TransferHistoryPort as TransferHistoryOper,
describe_history_gate,
evaluate_history_gate,
get_transfer_history_port,
is_skip_action,
max_failed_retries,
resolve_history,
@@ -111,7 +111,7 @@ class TransferDispatcher:
"""
try:
history = resolve_history(src_path, storage=storage,
transfer_history_oper=TransferHistoryOper())
transfer_history_oper=get_transfer_history_port())
except Exception as err:
logger.error(f"查询整理历史失败: {src_path} - {err}")
return None