From 13828668b0fc83234b3252d4c1a7e7e7ee1ca51d Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 2 Jul 2023 14:30:11 -0700 Subject: last run for job should be the chronologically most recent --- src/sql.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sql.rs b/src/sql.rs index a09e4bf..9d8613a 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -177,7 +177,7 @@ pub const LAST_RUN_FOR_JOB: &'static str = "\ complete_time, run_timeout, build_result, - final_status from runs where job_id=?1;"; + final_status from runs where job_id=?1 order by started_time desc limit 1;"; pub const SELECT_ALL_RUNS_WITH_JOB_INFO: &'static str = "\ select jobs.id as job_id, runs.id as run_id, runs.state, runs.created_time, jobs.commit_id -- cgit v1.1