Skip to content

Commit 3c3517b

Browse files
committed
🐛Autoscaling: fixes unknown passing type to dask-scheduler (#8556)
1 parent 36acc9d commit 3c3517b

File tree

1 file changed

+6
-5
lines changed
  • services/autoscaling/src/simcore_service_autoscaling/modules

1 file changed

+6
-5
lines changed

services/autoscaling/src/simcore_service_autoscaling/modules/dask.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ async def _list_cluster_known_tasks(
136136
) -> _DaskClusterTasks:
137137
def _list_on_scheduler(
138138
dask_scheduler: distributed.Scheduler,
139-
) -> _DaskClusterTasks:
139+
) -> dict[str, Any]:
140+
# NOTE: _DaskClusterTasks uses cannot be used here because of serialization issues
140141
worker_to_processing_tasks = defaultdict(list)
141142
unrunnable_tasks = {}
142143
for task_key, task_state in dask_scheduler.tasks.items():
@@ -153,10 +154,10 @@ def _list_on_scheduler(
153154
task_state.resource_restrictions or {}
154155
) | {DASK_WORKER_THREAD_RESOURCE_NAME: 1}
155156

156-
return _DaskClusterTasks(
157-
processing=worker_to_processing_tasks, # type: ignore[typeddict-item]
158-
unrunnable=unrunnable_tasks, # type: ignore[typeddict-item]
159-
)
157+
return {
158+
"processing": worker_to_processing_tasks,
159+
"unrunnable": unrunnable_tasks,
160+
}
160161

161162
list_of_tasks: _DaskClusterTasks = await client.run_on_scheduler(_list_on_scheduler)
162163
_logger.debug("found tasks: %s", list_of_tasks)

0 commit comments

Comments
 (0)