Skip to content

Commit

Permalink
enable shell option on flux worker (#866)
Browse files Browse the repository at this point in the history
* Enable script option to flux worker
  • Loading branch information
kchilleri authored Jul 25, 2024
1 parent b6ae339 commit 316a9ff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions beeflow/common/worker/flux_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ def build_jobspec(self, task):
"""Build the job spec for a task."""
# TODO: This has a lot of code in common with the other worker's build_text
crt_res = self.crt.run_text(task)
shell = task.get_requirement('beeflow:ScriptRequirement', 'shell', default='/bin/bash')
script = [
'#!/bin/bash',
'set -e',
crt_res.env_code,
f'#!{shell}',
]

if shell == "/bin/bash":
script.append('set -e')
script.append(crt_res.env_code)

# TODO: Should this entire model, saving stdout and stderr to files, be
# redone for Flux? It seems to provide some sort of KVS for storing
# output but I don't quite understand it.
Expand Down

0 comments on commit 316a9ff

Please sign in to comment.