fix: fence final worker admission against UI shutdown

This commit is contained in:
阿白叔 committed 2026-11-17 00:00:50 +08:00
1 parent dbc685b9a5
commit eabf61c73b
13 files changed
+356 -46

No files matched your search

+3 -2
View File
@@ -933,7 +933,7 @@ def _run_verify(request, *, timing, progress=None, flag_reader=None, process_run
'cancel_signal': str(root/'cancel-worker.signal'),
'start_gate': str(root/'start-worker.signal')}
job.update(operation_id=root.name, operation='verify', library=str(request.lmc_file),
block=request.block_name, session_record_path=str(root/'session.json'))
block=request.block_name, session_record_path=str(root/'session.json'), start_gate_protocol='event-v1')
from .session_record import process_identity
job['supervisor_identity'] = process_identity(os.getpid())
consent = None
@@ -1023,7 +1023,8 @@ def _run_verify(request, *, timing, progress=None, flag_reader=None, process_run
except RuntimeError as error:
return finish(VerifyResult('BLOCKED', stderr=str(error), safe_to_continue=False,
error_category='NATIVE_CHANNEL_BUSY'))
Path(job['start_gate']).touch()
from .operation_queue import commit_worker_start
commit_worker_start(process, job)
while process.poll() is None:
if stop is not None and stop.is_set():
save_markers = timing._save_markers