remove unused broker/coordinator methods
This commit is contained in:
parent
24eec69418
commit
22cea88c7e
2 changed files with 0 additions and 20 deletions
|
|
@ -237,22 +237,6 @@ impl Broker {
|
|||
|
||||
/// Get all reminders for an agent that are due now or in the past.
|
||||
/// Returns (id, message, file_path) tuples.
|
||||
pub fn get_due_reminders(&self, agent: &str) -> Result<Vec<(i64, String, Option<String>)>> {
|
||||
let conn = self.conn.lock().unwrap();
|
||||
let mut stmt = conn.prepare(
|
||||
"SELECT id, message, file_path FROM reminders WHERE agent = ?1 AND due_at <= ?2 AND sent_at IS NULL ORDER BY due_at ASC"
|
||||
)?;
|
||||
let rows = stmt.query_map(params![agent, now_unix()], |row| {
|
||||
Ok((
|
||||
row.get::<_, i64>(0)?,
|
||||
row.get::<_, String>(1)?,
|
||||
row.get::<_, Option<String>>(2)?,
|
||||
))
|
||||
})?;
|
||||
rows.collect::<rusqlite::Result<Vec<_>>>()
|
||||
.context("query reminders")
|
||||
}
|
||||
|
||||
/// Get all due reminders across all agents in a single query.
|
||||
/// Returns a vec of (agent, id, message, file_path) tuples.
|
||||
pub fn get_all_due_reminders(&self) -> Result<Vec<(String, i64, String, Option<String>)>> {
|
||||
|
|
|
|||
|
|
@ -118,10 +118,6 @@ impl Coordinator {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn list_agents(&self) -> Vec<String> {
|
||||
self.agents.lock().unwrap().keys().cloned().collect()
|
||||
}
|
||||
|
||||
/// Mark an agent as in-progress (only one state per agent for now).
|
||||
pub fn set_transient(&self, name: &str, kind: TransientKind) {
|
||||
self.transient.lock().unwrap().insert(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue