File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ class Client(HasTraits):
330
330
outstanding = Set ()
331
331
results = Instance ('collections.defaultdict' , (dict ,))
332
332
metadata = Instance ('collections.defaultdict' , (Metadata ,))
333
+ cluster = Instance ('ipyparallel.cluster.Cluster' , allow_none = True )
333
334
history = List ()
334
335
debug = Bool (False )
335
336
_futures = Dict ()
@@ -388,12 +389,14 @@ def __init__(
388
389
paramiko = None ,
389
390
timeout = 10 ,
390
391
cluster_id = None ,
392
+ cluster = None ,
391
393
** extra_args ,
392
394
):
395
+
396
+ super_kwargs = {'debug' : debug , 'cluster' : cluster }
393
397
if profile :
394
- super (Client , self ).__init__ (debug = debug , profile = profile )
395
- else :
396
- super (Client , self ).__init__ (debug = debug )
398
+ super_kwargs ['profile' ] = profile
399
+ super (Client , self ).__init__ (** super_kwargs )
397
400
if context is None :
398
401
context = zmq .Context .instance ()
399
402
self ._context = context
Original file line number Diff line number Diff line change @@ -420,7 +420,9 @@ def connect_client(self):
420
420
from ipyparallel import Client
421
421
422
422
return Client (
423
- parent = self , profile_dir = self .profile_dir , cluster_id = self .cluster_id
423
+ cluster = self ,
424
+ profile_dir = self .profile_dir ,
425
+ cluster_id = self .cluster_id ,
424
426
)
425
427
426
428
# context managers (both async and sync)
You can’t perform that action at this time.
0 commit comments