fix(tools-pve/asr-pipeline): mount gitea ssh key for Obsidian vault sync and fix provider source_detail
This commit is contained in:
@@ -191,13 +191,14 @@ def scan_inbox() -> None:
|
||||
process_audio(source, job)
|
||||
except Exception as exc:
|
||||
attempts = int((db.get_job(job["id"]) or {}).get("attempts") or 0)
|
||||
retry = attempts < MAX_ATTEMPTS
|
||||
is_empty_audio = isinstance(exc, providers.EmptyAudioError)
|
||||
retry = (attempts < MAX_ATTEMPTS) and not is_empty_audio
|
||||
db.update_job(
|
||||
job["id"], "queued" if retry else "failed",
|
||||
f"处理失败,等待重试 ({exc})" if retry else f"处理失败:{exc}",
|
||||
error_code=type(exc).__name__,
|
||||
)
|
||||
log(f"job={job['id']} failed type={type(exc).__name__} err={exc}")
|
||||
log(f"job={job['id']} failed type={type(exc).__name__} retry={retry} err={exc}")
|
||||
target = INBOX / source.name if retry else FAILED / source.name
|
||||
if source.exists():
|
||||
shutil.move(str(source), target)
|
||||
@@ -255,6 +256,7 @@ def recover() -> None:
|
||||
|
||||
def sync_vault_knowledge() -> None:
|
||||
try:
|
||||
vault.pull()
|
||||
lexicon.sync_from_vault()
|
||||
graph.sync()
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user