Skip to content

Commit

Permalink
Merge branch 'async' of github.com:C2SM/processing-chain into async
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Dec 12, 2023
2 parents 0131325 + fedc316 commit 2915d90
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,16 @@ def submit(self, job_name, script, add_dep=None):
if dep_cmd := self.get_dep_cmd(job_name, add_dep=add_dep):
sbatch_cmd.append(dep_cmd)
sbatch_cmd.append(script_path.name)

result = subprocess.run(sbatch_cmd, cwd=script_path.parent, capture_output=True)

result = subprocess.run(sbatch_cmd,
cwd=script_path.parent,
capture_output=True)
job_id = int(result.stdout)
if not job_name in self.job_ids['current']:
self.job_ids['current'][job_name] = [job_id]
else:
self.job_ids['current'][job_name].append(job_id)

# If needed internaly in a multi-job task like prepare_data
# Can then be passed as add_dep keyword
return job_id
Expand Down

0 comments on commit 2915d90

Please sign in to comment.