Skip to content

Commit

Permalink
Merge pull request #327 from mskcc/master
Browse files Browse the repository at this point in the history
Master to Develop
  • Loading branch information
sivkovic authored Oct 13, 2023
2 parents a6ce99f + ab7efb1 commit 4210256
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion batch_systems/lsf_client/lsf_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def submit(self, command, job_args, stdout, job_id, env={}):
Returns:
int: lsf job id
"""
bsub_command = ["bsub", "-sla", settings.LSF_SLA, "-g", format_lsf_job_id(job_id), "-oo", stdout] + job_args
if settings.LSF_SLA:
bsub_command = ["bsub", "-sla", settings.LSF_SLA, "-g", format_lsf_job_id(job_id), "-oo", stdout] + job_args
else:
bsub_command = ["bsub", "-g", format_lsf_job_id(job_id), "-oo", stdout] + job_args

bsub_command.extend(command)
current_env = os.environ.copy()
Expand Down
2 changes: 1 addition & 1 deletion ridgeback/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
TOIL_WORK_DIR_ROOT = os.environ["RIDGEBACK_TOIL_WORK_DIR_ROOT"]
TOIL_TMP_DIR_ROOT = os.environ["RIDGEBACK_TOIL_TMP_DIR_ROOT"]
LSF_WALLTIME = os.environ["RIDGEBACK_LSF_WALLTIME"]
LSF_SLA = os.environ["RIDGEBACK_LSF_SLA"]
LSF_SLA = os.environ.get("RIDGEBACK_LSF_SLA", None)
CWLTOIL = os.environ.get("RIDGEBACK_TOIL", "toil-cwl-runner")
TOIL_STATE_POLLING_WAIT = os.environ.get("TOIL_STATE_POLLING_WAIT", 60)

Expand Down
9 changes: 8 additions & 1 deletion submitter/toil_submitter/toil_jobsubmitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ def submit(self):
command_line = self._command_line()
log_path = os.path.join(self.job_work_dir, "lsf.log")
env = dict()
toil_lsf_args = "-sla %s %s %s" % (settings.LSF_SLA, " ".join(self._job_group()), " ".join(self._job_args()))
if settings.LSF_SLA:
toil_lsf_args = "-sla %s %s %s" % (
settings.LSF_SLA,
" ".join(self._job_group()),
" ".join(self._job_args()),
)
else:
toil_lsf_args = "%s %s" % (" ".join(self._job_group()), " ".join(self._job_args()))
env["JAVA_HOME"] = None
env["TOIL_LSF_ARGS"] = toil_lsf_args
external_id = self.lsf_client.submit(command_line, self._job_args(), log_path, self.job_id, env)
Expand Down

0 comments on commit 4210256

Please # to comment.