Skip to content

Commit

Permalink
BatchSpawnerBase: Store ip, port in self.server after connect_to_job
Browse files Browse the repository at this point in the history
This is required since data may change after the connect_to_job function.
  • Loading branch information
olifre committed Jul 11, 2022
1 parent b56fc82 commit ff1240f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions batchspawner/batchspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,11 @@ async def start(self):
if self.connect_to_job_cmd:
await self.connect_to_job()

# Port and ip can be changed in connect_to_job, push out to jupyterhub.
if self.server:
self.server.port = self.port
self.server.ip = self.ip

self.db.commit()
self.log.info(
"Notebook server job {0} started at {1}:{2}".format(
Expand Down

0 comments on commit ff1240f

Please sign in to comment.