Skip to content

Commit

Permalink
remove unused variable job_id_tag
Browse files Browse the repository at this point in the history
was used in the past for log messages which are now gone
  • Loading branch information
bernt-matthias committed Nov 14, 2023
1 parent a654b1d commit 6c5fc79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,12 +2094,8 @@ def discover_outputs(self, job, inp_data, out_data, out_collections, final_job_s
)

def check_tool_output(self, tool_stdout, tool_stderr, tool_exit_code, job, job_stdout=None, job_stderr=None):
job_id_tag = "<unknown job id>"
if job is not None:
job_id_tag = job.get_id_tag()

state, tool_stdout, tool_stderr, job_messages = check_output(
self.tool.stdio_regexes, self.tool.stdio_exit_codes, tool_stdout, tool_stderr, tool_exit_code, job_id_tag
self.tool.stdio_regexes, self.tool.stdio_exit_codes, tool_stdout, tool_stderr, tool_exit_code
)

# Store the modified stdout and stderr in the job:
Expand Down
8 changes: 4 additions & 4 deletions lib/galaxy/tool_util/output_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DETECTED_JOB_STATE(str, Enum):
ERROR_PEEK_SIZE = 2000


def check_output_regex(job_id_tag, regex, stream, stream_name, job_messages, max_error_level):
def check_output_regex(regex, stream, stream_name, job_messages, max_error_level):
"""
check a single regex against a stream
Expand All @@ -35,7 +35,7 @@ def check_output_regex(job_id_tag, regex, stream, stream_name, job_messages, max
return max_error_level


def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code, job_id_tag):
def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code):
"""
Check the output of a tool - given the stdout, stderr, and the tool's
exit code, return DETECTED_JOB_STATE.OK if the tool exited succesfully or
Expand Down Expand Up @@ -119,14 +119,14 @@ def check_output(stdio_regexes, stdio_exit_codes, stdout, stderr, tool_exit_code
# o If it was fatal, then we're done - break.
if regex.stderr_match:
max_error_level = check_output_regex(
job_id_tag, regex, stderr, "stderr", job_messages, max_error_level
regex, stderr, "stderr", job_messages, max_error_level
)
if max_error_level >= StdioErrorLevel.MAX:
break

if regex.stdout_match:
max_error_level = check_output_regex(
job_id_tag, regex, stdout, "stdout", job_messages, max_error_level
regex, stdout, "stdout", job_messages, max_error_level
)
if max_error_level >= StdioErrorLevel.MAX:
break
Expand Down

0 comments on commit 6c5fc79

Please sign in to comment.