Skip to content

Commit a388a84

Browse files
committed
ssh: add config option start_timeout
1 parent 3fe6155 commit a388a84

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

jupyterhub_ssh/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ async def start_user_server(self, session, username):
6565
# Server start requested, not done yet
6666
# We check for a while, reporting progress to user - until we're done
6767
try:
68-
# FIXME: Make this configurable?
69-
async with timeout(30):
68+
async with timeout(self.app.start_timeout):
7069
notebook_url = None
7170
self._conn.send_auth_banner("Starting your server...")
7271
while notebook_url is None:
@@ -242,6 +241,15 @@ class JupyterHubSSH(Application):
242241
config=True,
243242
)
244243

244+
start_timeout = Integer(
245+
30,
246+
help="""
247+
Timeout in seconds to wait for a server to start before before closing
248+
the SSH connection.
249+
""",
250+
config=True,
251+
)
252+
245253
def init_logging(self):
246254
"""
247255
Make traitlets & asyncssh logging work properly

0 commit comments

Comments
 (0)