Skip to content

Commit

Permalink
Python workflow adaptation of workflow.py so that it can also run on …
Browse files Browse the repository at this point in the history
…the CIMR VM.
  • Loading branch information
SabineEmbacher committed Apr 11, 2024
1 parent 1015f10 commit c5c60b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cems/src/main/python/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,12 @@ def run_matchup(self, hosts, num_parallel_tasks, simulation=False, logdir='trace

def run_post_processing(self, hosts, num_parallel_tasks, simulation=False, logdir='trace', synchronous=False):
"""
:param hosts: list
:param num_parallel_tasks: int
:param simulation: bool
:param logdir: str
:param synchronous: bool:
decides whether post_processing_run.sh (True) or post_processing_start.sh (False) is called.
:return:
"""

Expand All @@ -423,7 +424,7 @@ def run_post_processing(self, hosts, num_parallel_tasks, simulation=False, logdi
else:
runs_script = 'post_processing_start.sh'

monitor = self._get_monitor(hosts, [(runs_script, num_parallel_tasks)], logdir, simulation)
monitor = self._get_monitor(hosts, [(runs_script, num_parallel_tasks)], logdir, simulation, synchronous)
production_period = self.get_production_period()
date = production_period.get_start_date()
while date < production_period.get_end_date():
Expand All @@ -436,7 +437,7 @@ def run_post_processing(self, hosts, num_parallel_tasks, simulation=False, logdi
pre_condition = 'mmd-' + start_string + '-' + end_string
post_condition = 'post-processing-' + start_string + '-' + end_string + '-' + self.usecase_config

job = Job(job_name, 'post_processing_start.sh', [pre_condition], [post_condition],
job = Job(job_name, runs_script, [pre_condition], [post_condition],
[self.input_dir, start_string, end_string, self.usecase_config, self._get_config_dir()])
monitor.execute(job)

Expand Down

0 comments on commit c5c60b3

Please sign in to comment.