Corrected external add document issue.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s

This commit is contained in:
2026-02-19 14:26:29 -05:00
parent d85bddaa34
commit 8c73798f95
9 changed files with 76 additions and 68 deletions

View File

@@ -23,7 +23,7 @@ impl Session {
names
}
pub fn start(mut queue: Queue) {
pub fn document_definition() -> DocDef {
let mut docdef = DocDef::with_names(Self::doc_names());
let mut calc = Calculation::new(Operand::Add);
@@ -63,20 +63,6 @@ impl Session {
let delete_func = DocFuncType::Trigger(delete.into());
docdef.add_route(Clock::get_path(), delete_func);
let (tx, rx) = channel();
let sender_id = queue.add_sender(tx);
let msg = Message::new(docdef);
let msg_id = msg.get_message_id().clone();
let path = Path::new(
Include::Just(msg_id),
Include::All,
Include::Just(Action::Reply),
);
let reg_msg = Register::new(sender_id.clone(), RegMsg::AddRoute(path));
queue.send(msg.response(reg_msg));
rx.recv().unwrap();
queue.send(msg);
rx.recv().unwrap();
queue.remove_sender(&sender_id);
docdef
}
}