Skip to content

Commit

Permalink
attributes are under task
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Jun 12, 2024
1 parent 2e7d0fc commit d20e640
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jobspec/transformer/flux/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ def prepare(self, command=None, waitable=False):

# We can get the resources from options
resources = self.options.get("resources")

# These aren't used yet - they need to go into flux
attributes = self.options.get("attributes") or {}
task = self.options.get("task") or {}
attributes = task.get("attributes") or {}

# This flattens to be what we ask flux for
slot = resources.flatten_slot()
Expand All @@ -101,9 +99,10 @@ def prepare(self, command=None, waitable=False):
watch = attributes.get("watch")

# Environment
for key, value in attributes.get("environment") or {}:
for key, value in attributes.get("environment", {}).items():
cmd += [f"--env={key}={value}"]

print(cmd)
# Note that you need to install our frobnicator plugin
# for this to work. See the examples/depends_on directory
for depends_on in task.get("depends_on") or []:
Expand Down Expand Up @@ -270,7 +269,8 @@ def run(self, *args, **kwargs):
cmd = self.generate_command()

# Are we watching?
attributes = self.options.get("attributes") or {}
task = self.options.get("task") or {}
attributes = task.get("attributes") or {}
watch = attributes.get("watch")
res = utils.run_command(cmd, check_output=True, stream=watch)

Expand Down

0 comments on commit d20e640

Please sign in to comment.