pass coordinator to runner -> much more information available
This commit is contained in:
parent
f9c21c6e6b
commit
813804e33a
2 changed files with 16 additions and 9 deletions
|
|
@ -42,12 +42,12 @@ class Coordinator:
|
|||
def _load_runners(self, env_files: list[EnvFile]) -> list[Runner]:
|
||||
"""Creates an instance of the correct Runner class for each given env file"""
|
||||
runners: list[Runner] = []
|
||||
for env_file in env_files:
|
||||
for index, env_file in enumerate(env_files):
|
||||
RunnerClass = self.RUNNER_DICT[env_file.config["TYPE"]]
|
||||
dependency_classes: list[type[Runner]] = []
|
||||
for dependency in RunnerClass.dependencies:
|
||||
dependency_classes.append(self.RUNNER_DICT[dependency])
|
||||
runner_instance = RunnerClass(dotenv_path=env_file.env_path, DIR=self.DIR)
|
||||
runner_instance = RunnerClass(coordinator=self, runner_index=index)
|
||||
runner_instance._dependency_runners = dependency_classes
|
||||
runners.append(runner_instance)
|
||||
return runners
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue