We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55f4d56 commit dc3596fCopy full SHA for dc3596f
server/state_store/src/in_memory_state.rs
@@ -328,9 +328,11 @@ impl InMemoryState {
328
329
pub fn active_tasks_for_executor(&self, executor_id: &str) -> Vec<Box<Task>> {
330
let mut tasks = vec![];
331
- for (_, allocations) in self.allocations_by_fn.get(executor_id).unwrap() {
332
- for allocation in allocations {
333
- tasks.push(self.tasks.get(&allocation.task_key()).unwrap().clone());
+ if let Some(allocations_by_fn) = self.allocations_by_fn.get(executor_id) {
+ for allocations in allocations_by_fn.values() {
+ for allocation in allocations {
334
+ tasks.push(self.tasks.get(&allocation.task_key()).unwrap().clone());
335
+ }
336
}
337
338
tasks
0 commit comments