[BE] fix issue when result is done it does not get fetched due to status update happens earlier than result update

This commit is contained in:
HappyZ 2023-05-12 09:21:08 -07:00
parent a9d4f8e3d7
commit d36f92a284
1 changed files with 1 additions and 1 deletions

View File

@ -122,11 +122,11 @@ def backend(model, is_debugging: bool):
)
continue
database.update_job(result_dict, job_uuid=next_job[UUID])
if not is_debugging:
database.update_job(
{KEY_JOB_STATUS: VALUE_JOB_DONE}, job_uuid=next_job[UUID]
)
database.update_job(result_dict, job_uuid=next_job[UUID])
logger.critical("stopped")