hive-sh4re: split manager-socket constants + HelperEvent into their own topic module
This commit is contained in:
parent
02bbff1e34
commit
138f6b6c10
24 changed files with 268 additions and 244 deletions
|
|
@ -31,7 +31,7 @@ pub(super) fn handle_list_schedules(coord: &Arc<Coordinator>) -> Response {
|
|||
pub(super) fn handle_request_schedule_prompt(
|
||||
coord: &Arc<Coordinator>,
|
||||
requester: &str,
|
||||
payload: &hive_sh4re::SchedulePromptPayload,
|
||||
payload: &hive_sh4re::manager::SchedulePromptPayload,
|
||||
) -> Response {
|
||||
if payload.targets.is_empty() {
|
||||
return Response::Err {
|
||||
|
|
@ -275,7 +275,7 @@ fn cancel_authorized(requester: &str, owner: &str) -> bool {
|
|||
if requester == owner {
|
||||
return true;
|
||||
}
|
||||
if requester == hive_sh4re::OPERATOR_RECIPIENT {
|
||||
if requester == hive_sh4re::manager::OPERATOR_RECIPIENT {
|
||||
return true;
|
||||
}
|
||||
// Manager can cancel anything owned by an agent in its subtree.
|
||||
|
|
@ -310,8 +310,9 @@ pub(crate) fn filter_ghost_schedule_targets(
|
|||
live: &std::collections::HashSet<String>,
|
||||
) {
|
||||
for s in schedules.iter_mut() {
|
||||
s.targets
|
||||
.retain(|t| t.target == hive_sh4re::OPERATOR_RECIPIENT || live.contains(&t.target));
|
||||
s.targets.retain(|t| {
|
||||
t.target == hive_sh4re::manager::OPERATOR_RECIPIENT || live.contains(&t.target)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue