add reminder rollup RPC and broker query
Surface reminder activity statistics (scheduled, delivered, pending counts) for each agent over configurable time windows. Needed by the per-agent stats page to display reminder metrics. Adds: - ReminderStats struct and ReminderRollup request/response variants - Broker::reminder_rollup_for(agent, since_secs) method - Agent and manager socket handlers for the new RPC - SocketReply mapping for response conversion
This commit is contained in:
parent
4715e88fff
commit
91bfa269fd
5 changed files with 89 additions and 0 deletions
|
|
@ -369,6 +369,14 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
|
|||
},
|
||||
}
|
||||
}
|
||||
ManagerRequest::ReminderRollup { since_secs } => {
|
||||
match coord.broker.reminder_rollup_for(MANAGER_AGENT, *since_secs) {
|
||||
Ok(stats) => ManagerResponse::ReminderRollup(stats),
|
||||
Err(e) => ManagerResponse::Err {
|
||||
message: format!("{e:#}"),
|
||||
},
|
||||
}
|
||||
}
|
||||
ManagerRequest::Whoami => ManagerResponse::Whoami {
|
||||
name: MANAGER_AGENT.to_owned(),
|
||||
role: "manager".to_owned(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue