Fix worker interruption handling

This commit is contained in:
Emil
2026-07-24 13:19:40 +03:00
parent 08f5478a66
commit 9ec8f50313
5 changed files with 137 additions and 28 deletions
+2 -2
View File
@@ -69,13 +69,13 @@ def main(argv: list[str] | None = None) -> int:
parser.error(str(error))
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
client = HttpCoordinatorClient(config.coordinator_url, config.request_timeout, config.bearer_token)
WorkerDaemon(
completed_without_interruption = WorkerDaemon(
config,
client,
HttpArtifactClient(config.coordinator_url, config.request_timeout, config.bearer_token),
SciMeshRunner(),
).run_forever()
return 0
return 0 if completed_without_interruption else 130
if __name__ == "__main__":