Skip to content

Commit b638c98

Browse files
Lucio Anderlinilanderlini
authored andcommitted
improvements to the clustersubmit script
1 parent 3507c4a commit b638c98

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_immediate_submit_without_shared_fs/clustersubmit

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@ async def execute_single_job(jobid, jobscript):
7979
proc = await asyncio.create_subprocess_shell(jobscript)
8080
stdout, stderr = await proc.communicate()
8181
if proc.returncode != 0:
82-
logging.critical(stdout)
83-
logging.critical(stderr)
84-
raise RuntimeError(f"Falied executing job {jobid}")
82+
logging.error(f"Job {jobid} failed with return code {proc.returncode}")
83+
if stdout:
84+
logging.debug(f"Job {jobid} stdout: {stdout.decode()[:500]}...")
85+
if stderr:
86+
logging.error(f"Job {jobid} stderr: {stderr.decode()[:500]}...")
87+
88+
raise RuntimeError(f"Faied executing job {jobid}")
8589

8690
async with db_lock:
8791
with sqlite3.connect(DATABASE_FILE, timeout=30) as db:

0 commit comments

Comments
 (0)