diff options
author | iximeow <me@iximeow.net> | 2023-07-04 15:48:47 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-07-04 15:48:47 -0700 |
commit | 138800914aa38f25db2788a94a0327c692e29557 (patch) | |
tree | 52d9012ee59f912c3044788e4d25d091953753a5 /src/sql.rs | |
parent | c32adfb1956f89f7f778edce9e0367086080b058 (diff) |
set a limit for how far back we'll construct new runs of existing jobs for new hosts
Diffstat (limited to 'src/sql.rs')
-rw-r--r-- | src/sql.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -144,9 +144,9 @@ pub const PENDING_RUNS: &'static str = "\ pub const JOBS_NEEDING_HOST_RUN: &'static str = "\ select jobs.id, jobs.source, jobs.created_time, jobs.remote_id, jobs.commit_id, jobs.run_preferences from jobs \ - where jobs.run_preferences=\"all\" \ + where jobs.run_preferences=\"all\" and jobs.created_time > ?1 \ and not exists \ - (select 1 from runs r2 where r2.job_id = jobs.id and r2.host_id = ?1);"; + (select 1 from runs r2 where r2.job_id = jobs.id and r2.host_id = ?2);"; pub const ACTIVE_RUNS: &'static str = "\ select id, |