Skip to content

Commit

Permalink
passing task configuration to called scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
thusser committed Oct 24, 2024
1 parent 707407d commit 9f26493
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyobs/robotic/scripts/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ async def run(

# check in cases
if value in self.cases:
await self.get_object(self.cases[value], Script).run(task_runner, task_schedule, task_archive)
script = self.get_object(self.cases[value], Script, configuration=self.configuration)
elif "else" in self.cases:
await self.get_object(self.cases["else"], Script).run(task_runner, task_schedule, task_archive)
script = self.get_object(self.cases["else"], Script, configuration=self.configuration)
else:
raise ValueError("Invalid choice")
await script.run(task_runner, task_schedule, task_archive)


__all__ = ["CasesRunner"]

0 comments on commit 9f26493

Please sign in to comment.