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 authored and consideRatio committed Mar 16, 2024
1 parent f7de5ad commit 547aa0c
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 @@ -448,6 +448,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 547aa0c

Please sign in to comment.