summaryrefslogtreecommitdiff
path: root/src/sql.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2023-06-29 02:17:11 -0700
committeriximeow <me@iximeow.net>2023-06-29 02:17:11 -0700
commit954a65107b59b9a547ca5ce0f1fa2dd41e013cd6 (patch)
treee4712344007c139b01f9f361bede9ef518c1fd1b /src/sql.rs
parent9f44782ebd991c9a4d3d1d33cb9e6b34ed221b88 (diff)
more gross hacks to get a list of active jobs
Diffstat (limited to 'src/sql.rs')
-rw-r--r--src/sql.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sql.rs b/src/sql.rs
index 2620a58..96d2ef8 100644
--- a/src/sql.rs
+++ b/src/sql.rs
@@ -97,6 +97,9 @@ pub const CREATE_REPO_NAME_INDEX: &'static str = "\
pub const PENDING_JOBS: &'static str = "\
select id, artifacts_path, state, run_host, remote_id, commit_id, created_time, source from jobs where state=0;";
+pub const STARTED_JOBS: &'static str = "\
+ select * from jobs where state=1;";
+
pub const LAST_ARTIFACTS_FOR_JOB: &'static str = "\
select * from artifacts where job_id=?1 and (name like \"%(stderr)%\" or name like \"%(stdout)%\") order by id desc limit ?2;";