From eb3c6aff1d9cc72b916c2b5c4fda56f16a88ae1f Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 28 Jan 2025 07:10:08 +0100 Subject: [PATCH] Fix bugs with Sun Grid Engine --- pysqa/wrapper/sge.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pysqa/wrapper/sge.py b/pysqa/wrapper/sge.py index c95f6d7..2b262be 100644 --- a/pysqa/wrapper/sge.py +++ b/pysqa/wrapper/sge.py @@ -82,6 +82,11 @@ def leaf_to_dict(leaf): } ) + @staticmethod + def get_job_id_from_output(queue_submit_output: str) -> int: + """Extracts the job ID from the output of the job submission command.""" + return int(queue_submit_output.splitlines()[-1].rstrip().lstrip().split()[-1]) + def render_submission_template( self, command: str,