Skip to content

Commit

Permalink
poll job status while waiting for single-user server to be reachable
Browse files Browse the repository at this point in the history
  • Loading branch information
lexming committed Dec 14, 2022
1 parent 0b15e4f commit ff04de4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions batchspawner/batchspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,13 @@ async def start(self):
# don't actually run the single-user server yet.
if hasattr(self, "mock_port"):
self.port = self.mock_port
# Check if job is still running
status = await self.poll()
if status:
raise RuntimeError(
"The Jupyter batch job started"
" but died before launching the single-user server."
)

self.db.commit()
self.log.info(
Expand Down

0 comments on commit ff04de4

Please sign in to comment.