summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2023-07-01 15:56:35 -0700
committeriximeow <me@iximeow.net>2023-07-01 15:56:35 -0700
commitaf1ecfa7b9911db3a3a8750f7fd20a046db3d1c9 (patch)
treeb83a1da0f707d04f7f4b9bea8787ba21fc357990 /src
parente893fac0ed5d85c0d0d0270a0b530d95c8d4baeb (diff)
fix pending jobs query, right number of columns
Diffstat (limited to 'src')
-rw-r--r--src/dbctx.rs7
-rw-r--r--src/sql.rs2
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);
}
diff --git a/src/sql.rs b/src/sql.rs
index cc33ad4..e911c96 100644
--- a/src/sql.rs
+++ b/src/sql.rs
@@ -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,