Skip to content

Commit

Permalink
fix(client):exit error code when failed (#1192)
Browse files Browse the repository at this point in the history
exit error code when failed
  • Loading branch information
goldenxinxing authored Sep 14, 2022
1 parent 7bcb723 commit 0bdc3fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/starwhale/core/model/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import os
import sys
import typing as t
from abc import ABCMeta
from pathlib import Path
Expand Down Expand Up @@ -278,7 +279,6 @@ def eval_user_handler(
logger.error(f"job:{job_name} execute error:{e}")
_status = STATUS.FAILED
_manifest["error_message"] = str(e)
raise
finally:
_manifest.update(
{
Expand All @@ -300,6 +300,8 @@ def eval_user_handler(
console.print(
f":{100 if _status == STATUS.SUCCESS else 'broken_heart'}: finish run, {_status}!"
)
if _status != STATUS.SUCCESS:
sys.exit(-1)

def info(self) -> t.Dict[str, t.Any]:
return self._get_bundle_info()
Expand Down

0 comments on commit 0bdc3fa

Please sign in to comment.