Skip to content

Commit

Permalink
Move exit_code_file to fix AsynchronousJobState
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 21, 2024
1 parent 51fbc18 commit 44c7bb1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/galaxy/jobs/runners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,17 @@ def __init__(self, job_wrapper: "JobWrapper", job_destination: "JobDestination")
self.job_destination = job_destination
self.runner_state = None
self.redact_email_in_job_name = True
self._exit_code_file = None
if self.job_wrapper:
self.redact_email_in_job_name = self.job_wrapper.app.config.redact_email_in_job_name

self.cleanup_file_attributes = ["job_file", "output_file", "error_file", "exit_code_file"]

@property
def exit_code_file(self) -> str:
return default_exit_code_file(self.job_wrapper.working_directory, self.job_wrapper.get_id_tag())
return self._exit_code_file or default_exit_code_file(
self.job_wrapper.working_directory, self.job_wrapper.get_id_tag()
)

def set_defaults(self, files_dir):
if self.job_wrapper is not None:
Expand Down Expand Up @@ -755,7 +758,7 @@ def __init__(
self.output_file = output_file
self.error_file = error_file
if exit_code_file:
self.exit_code_file = exit_code_file
self._exit_code_file = exit_code_file
self.job_name = job_name

self.set_defaults(files_dir)
Expand Down

0 comments on commit 44c7bb1

Please sign in to comment.