fix: publish management receipt before orphan-exitable terminal state

This commit is contained in:
阿白叔 committed 2026-11-09 14:44:09 +08:00
1 parent 74a45eb5cf
commit a045683c8a
3 files changed
+24 -2

No files matched your search

+2 -1
View File
@@ -1303,6 +1303,7 @@ def management_worker_main(request_path):
result['exception'] = _exception_details(error)
finally:
from .session_record import update_worker_state
update_worker_state(job, 'FINISHED' if result.get('safe_to_continue') is True else 'UNCONFIRMED')
_write_json(root/'result.json', result)
# FINISHED permits the orphan watchdog to exit immediately.
update_worker_state(job, 'FINISHED' if result.get('safe_to_continue') is True else 'UNCONFIRMED')
return 0 if result['success'] and result['safe_to_continue'] else 2