wire reminder ops into the in-agent socket dispatch (#2635 inc 1)
This commit is contained in:
parent
174e277340
commit
ecd9030305
6 changed files with 178 additions and 45 deletions
|
|
@ -58,7 +58,10 @@ fn remind_max_pending() -> u64 {
|
|||
/// serve loop's receiver never observes a closed channel (which would
|
||||
/// otherwise resolve immediately every iteration and busy-loop the
|
||||
/// select), while cleanly disabling delivery.
|
||||
pub async fn run(store: Option<Arc<Reminders>>, tx: mpsc::UnboundedSender<hive_sh4re::DeliveredMessage>) {
|
||||
pub async fn run(
|
||||
store: Option<Arc<Reminders>>,
|
||||
tx: mpsc::UnboundedSender<hive_sh4re::DeliveredMessage>,
|
||||
) {
|
||||
let Some(store) = store else {
|
||||
tracing::error!("reminders db unavailable — reminder delivery disabled");
|
||||
std::future::pending::<()>().await;
|
||||
|
|
@ -144,8 +147,9 @@ fn prepare_remind_storage(
|
|||
};
|
||||
let path = resolve_state_path(&req_path)
|
||||
.map_err(|reason| format!("auto-save path `{req_path}` rejected: {reason}"))?;
|
||||
write_payload(&path, message)
|
||||
.map_err(|reason| format!("auto-save of large reminder body to `{req_path}` failed: {reason}"))?;
|
||||
write_payload(&path, message).map_err(|reason| {
|
||||
format!("auto-save of large reminder body to `{req_path}` failed: {reason}")
|
||||
})?;
|
||||
let hint = format!(
|
||||
"[reminder body of {} bytes auto-saved to `{req_path}`; read with your filesystem tools]",
|
||||
message.len()
|
||||
|
|
|
|||
Loading…
Reference in a new issue