Skip to content

Commit 155a280

Browse files
committed
prevent failing when no dask certificates around
1 parent ae2b410 commit 155a280

File tree

1 file changed

+6
-2
lines changed
  • scripts/maintenance/computational-clusters/autoscaled_monitor

1 file changed

+6
-2
lines changed

scripts/maintenance/computational-clusters/autoscaled_monitor/dask.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _list_tasks(
116116
list_of_tasks = await client.run_on_scheduler(_list_tasks) # type: ignore
117117
except TypeError:
118118
rich.print(
119-
f"ERROR while recoverring unrunnable tasks using {dask_client=}. Defaulting to empty list of tasks!!"
119+
"ERROR while recoverring unrunnable tasks . Defaulting to empty list of tasks!!"
120120
)
121121
return list_of_tasks
122122

@@ -126,12 +126,16 @@ async def get_scheduler_details(state: AppState, instance: Instance):
126126
datasets_on_cluster = ()
127127
processing_jobs = {}
128128
all_tasks = {}
129-
with contextlib.suppress(TimeoutError, OSError):
129+
try:
130130
async with dask_client(state, instance) as client:
131131
scheduler_info = client.scheduler_info()
132132
datasets_on_cluster = await _wrap_dask_async_call(client.list_datasets())
133133
processing_jobs = await _wrap_dask_async_call(client.processing())
134134
all_tasks = await _list_all_tasks(client)
135+
except (TimeoutError, OSError, TypeError):
136+
rich.print(
137+
"ERROR while recoverring scheduler details !! no scheduler info found!!"
138+
)
135139

136140
return scheduler_info, datasets_on_cluster, processing_jobs, all_tasks
137141

0 commit comments

Comments
 (0)