Add CI integration.
This commit is contained in:
@@ -74,7 +74,7 @@ impl DbHandle {
|
||||
"WITH next_runs AS (SELECT next_run FROM global_action UNION SELECT next_run FROM local_action) SELECT next_run FROM next_runs ORDER BY next_run ASC",
|
||||
)?;
|
||||
let rows = stmt
|
||||
.query_map(params![], |row| Ok(row.get(0)?))?
|
||||
.query_map(params![], |row| row.get(0))?
|
||||
.collect::<Result<Vec<u64>, _>>()?;
|
||||
if let Some(r) = rows.into_iter().next() {
|
||||
let next_run = SystemTime::UNIX_EPOCH + Duration::from_secs(r);
|
||||
@@ -84,6 +84,6 @@ impl DbHandle {
|
||||
return Ok(next_run.duration_since(now)?);
|
||||
}
|
||||
}
|
||||
return Ok(Duration::from_secs(0));
|
||||
Ok(Duration::from_secs(0))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
pub(crate) struct DbGlobalAction {
|
||||
pub(crate) name: String,
|
||||
#[allow(dead_code)]
|
||||
pub(crate) next_run: i64,
|
||||
}
|
||||
|
||||
@@ -8,5 +9,6 @@ pub(crate) struct DbLocalAction {
|
||||
pub(crate) jail_name: String,
|
||||
pub(crate) tree: String,
|
||||
pub(crate) set_name: String,
|
||||
#[allow(dead_code)]
|
||||
pub(crate) next_run: i64,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user