diff options
author | iximeow <me@iximeow.net> | 2023-07-01 15:56:35 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-07-01 15:56:35 -0700 |
commit | af1ecfa7b9911db3a3a8750f7fd20a046db3d1c9 (patch) | |
tree | b83a1da0f707d04f7f4b9bea8787ba21fc357990 /src | |
parent | e893fac0ed5d85c0d0d0270a0b530d95c8d4baeb (diff) |
fix pending jobs query, right number of columns
Diffstat (limited to 'src')
-rw-r--r-- | src/dbctx.rs | 7 | ||||
-rw-r--r-- | src/sql.rs | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/dbctx.rs b/src/dbctx.rs index 331e55f..325bad2 100644 --- a/src/dbctx.rs +++ b/src/dbctx.rs @@ -513,7 +513,12 @@ impl DbCtx { let mut pending = Vec::new(); while let Some(row) = runs.next().unwrap() { - let run = crate::sql::row2run(row).into_pending_run(); + let (id, job_id, create_time) = row.try_into().unwrap(); + let run = PendingRun { + id, + job_id, + create_time, + }; pending.push(run); } @@ -122,7 +122,7 @@ pub const CREATE_REPO_NAME_INDEX: &'static str = "\ CREATE UNIQUE INDEX IF NOT EXISTS 'repo_names' ON repos(repo_name);"; pub const PENDING_RUNS: &'static str = "\ - select id, job_id, artifacts_path, state, run_host, created_time from runs where state=0;"; + select id, job_id, created_time from runs where state=0;"; pub const ACTIVE_RUNS: &'static str = "\ select id, |