fix: failed case marked as success

This commit is contained in:
bennykok 2024-04-20 01:38:31 +08:00
parent 3b6a753472
commit 35fed9aa4d

View File

@ -717,7 +717,7 @@ def update_run(prompt_id: str, status: Status):
if (prompt_metadata[prompt_id].status != status): if (prompt_metadata[prompt_id].status != status):
# when the status is already failed, we don't want to update it to success # when the status is already failed, we don't want to update it to success
if ('status' in prompt_metadata[prompt_id] and prompt_metadata[prompt_id].status == Status.FAILED): if (prompt_metadata[prompt_id].status is Status.FAILED):
return return
status_endpoint = prompt_metadata[prompt_id].status_endpoint status_endpoint = prompt_metadata[prompt_id].status_endpoint