Skip to content

Commit 5fc892e

Browse files
authored
Merge pull request #872 from minrk/timeout
add ControllerLauncher.connection_info_timeout config
2 parents 8eb8ec6 + 65064ca commit 5fc892e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

ipyparallel/cluster/launcher.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,26 @@ class ControllerLauncher(BaseLauncher):
353353
help="""command-line args to pass to ipcontroller""",
354354
)
355355

356-
async def get_connection_info(self, timeout=60):
356+
connection_info_timeout = Float(
357+
60,
358+
config=True,
359+
help="""
360+
Default timeout (in seconds) for get_connection_info
361+
362+
.. versionadded:: 8.7
363+
""",
364+
)
365+
366+
async def get_connection_info(self, timeout=None):
357367
"""Retrieve connection info for the controller
358368
359369
Default implementation assumes profile_dir and cluster_id are local.
370+
371+
.. versionchanged:: 8.7
372+
Accept `timeout=None` (default) to use `.connection_info_timeout` config.
360373
"""
374+
if timeout is None:
375+
timeout = self.connection_info_timeout
361376
connection_files = self.connection_files
362377
paths = list(connection_files.values())
363378
start_time = time.monotonic()

0 commit comments

Comments
 (0)