fix: keep the post-save release result through slow file probes

This commit is contained in:
阿白叔 committed 2026-11-25 11:19:34 +08:00
1 parent 2e87627ef1
commit edd1e088af
2 files changed
+36 -3

No files matched your search

+5 -3
View File
@@ -38,14 +38,16 @@ def wait_for_saved_database_release(library, project, pcb, *, stop=None,
report_pending=lambda **event: None, timeout_seconds=75):
"""Check scoped files after PCB exits, outside the host native channel."""
from .file_probe import hold_release_files
from .operation_queue import note_metadata_progress
from .operation_queue import native_phase, note_metadata_progress
deadline = time.monotonic() + timeout_seconds
reported = None
while True:
try:
with hold_release_files(library, saved_project=(project, pcb), timeout_seconds=deadline-time.monotonic(),
stop=stop) as proof:
# The file helper has its own bounded deadline. Preserve its result
# if a single SMB probe reaches the generic metadata timeout.
with native_phase(read_only=True), hold_release_files(
library, saved_project=(project, pcb), timeout_seconds=deadline-time.monotonic(), stop=stop) as proof:
return {**proof, 'status': 'RELEASE_CONFIRMED', 'blocked_resources': []}
except (OSError, ValueError) as error:
winerror = getattr(error, 'winerror', None)