Skip to content

Commit d12fc5d

Browse files
committed
Revert "šŸ›Autoscaling: fixes unknown passing type to dask-scheduler (#8556)"
This reverts commit 4d1cccd.
1 parent 4d1cccd commit d12fc5d

File tree

1 file changed

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

1 file changed

+5
-6
lines changed

ā€Žservices/autoscaling/src/simcore_service_autoscaling/modules/dask.pyā€Ž

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

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

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

0 commit comments

Comments
Ā (0)