Skip to content

Commit

Permalink
Handling for jobs without VNC
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Sep 28, 2023
1 parent e34d938 commit a53b336
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions hyakvnc/vncsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,16 @@ def find_running_sessions(app_config: HyakVncConfig, job_id: Optional[int] = Non
if instance.name.startswith(prefix):
logger.debug(f"Found apptainer instance {instance.name} with pid {instance.pid}")
sesh = HyakVncSession(job_info.job_id, instance, app_config)
sesh.parse_vnc_info()
if sesh.is_alive():
logger.debug(f"Session {sesh} is alive")
outs.append(sesh)
try:
sesh.parse_vnc_info()
except RuntimeError as e:
logger.debug("Could not parse VNC info for session {sesh}: {e}")
else:
logger.debug(f"Session {sesh} not alive")
if sesh.is_alive():
logger.debug(f"Session {sesh} is alive")
outs.append(sesh)
else:
logger.debug(f"Session {sesh} not alive")
return outs


Expand Down

0 comments on commit a53b336

Please sign in to comment.