summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,