refactor: Cleaned up some left-over implementation stubs
This commit is contained in:
@@ -48,10 +48,6 @@ impl Inbox {
|
||||
|
||||
msgs
|
||||
}
|
||||
|
||||
pub fn pending_count(&self) -> usize {
|
||||
self.messages.lock().len()
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for Inbox {
|
||||
|
||||
@@ -15,7 +15,6 @@ use tokio::task::JoinHandle;
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum AgentExitStatus {
|
||||
Completed,
|
||||
Cancelled,
|
||||
Failed(String),
|
||||
}
|
||||
|
||||
@@ -95,18 +94,6 @@ impl Supervisor {
|
||||
self.handles.get(id).map(|h| h.join_handle.is_finished())
|
||||
}
|
||||
|
||||
pub fn take_if_finished(&mut self, id: &str) -> Option<AgentHandle> {
|
||||
if self
|
||||
.handles
|
||||
.get(id)
|
||||
.is_some_and(|h| h.join_handle.is_finished())
|
||||
{
|
||||
self.handles.remove(id)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take(&mut self, id: &str) -> Option<AgentHandle> {
|
||||
self.handles.remove(id)
|
||||
}
|
||||
|
||||
@@ -150,10 +150,6 @@ impl TaskQueue {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn runnable_tasks(&self) -> Vec<&TaskNode> {
|
||||
self.tasks.values().filter(|t| t.is_runnable()).collect()
|
||||
}
|
||||
|
||||
pub fn get(&self, task_id: &str) -> Option<&TaskNode> {
|
||||
self.tasks.get(task_id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user