Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

hide empty before/after task in ParallelTask #93

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mara_pipelines/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ def add_parallel_tasks(self, sub_pipeline: 'Pipeline') -> None:
def launch(self) -> 'Pipeline':
sub_pipeline = Pipeline(self.id, description=f'Runs f{self.id} in parallel',
max_number_of_parallel_tasks=self.max_number_of_parallel_tasks)
sub_pipeline.add_initial(Task(id='before', description='Runs commands-before', commands=self.commands_before))
sub_pipeline.add_final(Task(id='after', description='Runs commands-after', commands=self.commands_after))
if self.commands_before:
sub_pipeline.add_initial(Task(id='before', description='Runs commands-before', commands=self.commands_before))
if self.commands_after:
sub_pipeline.add_final(Task(id='after', description='Runs commands-after', commands=self.commands_after))

self.add_parallel_tasks(sub_pipeline)

Expand Down