Add local build action.

This commit is contained in:
Tom Alexander
2024-05-05 10:48:06 -04:00
parent e15b0fd95e
commit 2c7389201b
6 changed files with 99 additions and 7 deletions

View File

@@ -50,15 +50,16 @@ impl DbHandle {
.duration_since(SystemTime::UNIX_EPOCH)?
.as_secs();
let mut stmt = self.conn.prepare(
"SELECT jail_name, tree, set_name, next_run FROM local_action WHERE next_run <= $1",
"SELECT name, jail_name, tree, set_name, next_run FROM local_action WHERE next_run <= $1",
)?;
let rows = stmt
.query_map(params![now], |row| {
Ok(DbLocalAction {
jail_name: row.get(0)?,
tree: row.get(1)?,
set_name: row.get(2)?,
next_run: row.get(3)?,
name: row.get(0)?,
jail_name: row.get(1)?,
tree: row.get(2)?,
set_name: row.get(3)?,
next_run: row.get(4)?,
})
})?
.collect::<Result<Vec<_>, _>>()?;

View File

@@ -4,6 +4,7 @@ pub(crate) struct DbGlobalAction {
}
pub(crate) struct DbLocalAction {
pub(crate) name: String,
pub(crate) jail_name: String,
pub(crate) tree: String,
pub(crate) set_name: String,