Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kreuzert/jupyterhub-backendspawner …
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
kreuzert committed Jun 2, 2023
2 parents 9b3ffd2 + f7a7b72 commit 5056b1f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion backendspawner/backendspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,26 @@ def get_request_kwargs(self):
request_kwargs = self.request_kwargs
return request_kwargs

port = Union(
custom_port = Union(
[Integer(), Callable()],
default_value=8080,
help="""
""",
).tag(config=True)

port = Integer(
help="""
The port for single-user servers to listen on.
""",
)

@default('port')
def get_port(self):
port = self.custom_port
if callable(port):
port = port()
return port

async def get_port(self):
if callable(self.port):
port = await maybe_future(self.port(self))
Expand Down

0 comments on commit 5056b1f

Please sign in to comment.