Skip to content

Commit

Permalink
[FIX] truncate long log
Browse files Browse the repository at this point in the history
  • Loading branch information
nolan1999 committed Mar 25, 2024
1 parent 068cbcf commit 1060464
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@
if res["StatusCode"] == 0:
api_job.ping(status="finished", exit_code=0, body="")
else:
logs = f"Logs:\n{str(container.logs())}"
logs = str(container.logs())
print(logs)
logs = f"Logs:\n{logs[-1000:]}"
api_job.ping(status="error", exit_code=res["StatusCode"], body=logs)

except HTTPError as e:
Expand Down

0 comments on commit 1060464

Please sign in to comment.