File tree Expand file tree Collapse file tree
bindings/distrdf/python/DistRDF/Backends/Dask Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ def __init__(self, daskclient: Optional[Client] = None):
105105 self .client = (daskclient if daskclient is not None else
106106 Client (LocalCluster (n_workers = os .cpu_count (), threads_per_worker = 1 , processes = True )))
107107
108- workers = self .client .scheduler_info ()["workers" ]
108+ workers = self .client .scheduler_info ().get ("workers" , None )
109+
110+ if workers is None :
111+ return
109112
110113 for worker in workers .values ():
111114 threads = worker .get ("nthreads" , 1 )
@@ -114,7 +117,7 @@ def __init__(self, daskclient: Optional[Client] = None):
114117 raise RuntimeError (
115118 "DistRDF with Dask does not support threaded workers. "
116119 "Please use processes=True and threads_per_worker=1."
117- )
120+ )
118121
119122 def optimize_npartitions (self ) -> int :
120123 """
You can’t perform that action at this time.
0 commit comments