fix(优先组): #18 密钥明文直配 config(弃 .env 依赖);#5 appearances 改 distinct 视频数覆盖校准(防 reconcile 累加膨胀);#9 oracle_sync 拉取加锁防 trigger_now 与后台并发双拉;#11 LLM 合并命名解析 target 已有 canonical(统一显示名)
This commit is contained in:
@@ -49,10 +49,16 @@ class OracleSync:
|
||||
self._last_sync_at = None
|
||||
self._last_error = None
|
||||
self._last_count = None
|
||||
# 拉取互斥锁:trigger_now(命名后即时拉回)与后台 _run 并发时只允许一个执行
|
||||
self._pull_lock = threading.Lock()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
def _pull_once(self) -> bool:
|
||||
"""执行一次增量拉取。返回是否成功。"""
|
||||
"""执行一次增量拉取(加锁防并发双拉)。返回是否成功。"""
|
||||
with self._pull_lock:
|
||||
return self._pull_once_locked()
|
||||
|
||||
def _pull_once_locked(self) -> bool:
|
||||
since = db_layer.get_sync_cursor() or ''
|
||||
params = {'since': since, 'token': self.token}
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user