def start_timed_tasks_for_running_plans(): for plan_id in plan_repo.get_running_plan_ids(): plan = plan_repo.get_plan_by_id(plan_id) for task in plan.get_tasks(): task_start_time = task.get_start_on() if task_start_time and timer_svc.is_current_datetime_later_than(task_start_time): orchestrator.execute_task(plan_id, task.get_task_id())
def start_timed_tasks_for_running_plans(): for plan_id in plan_repo.get_running_plan_ids(): plan = plan_repo.get_plan_by_id(plan_id) for task in plan.get_tasks(): task_start_time = task.get_start_on() if task_start_time and timer_svc.is_current_datetime_later_than( task_start_time): orchestrator.execute_task(plan_id, task.get_task_id())
def start_timed_plans(): for plan_id in plan_repo.get_not_started_timed_plan_ids(): plan = plan_repo.get_plan_by_id(plan_id) if timer_svc.is_current_datetime_later_than( plan.get_start_on() ): # TODO Add task_starter and task_listener orchestrator.execute_plan(plan_id)
def start_timed_plans(): for plan_id in plan_repo.get_not_started_timed_plan_ids(): plan = plan_repo.get_plan_by_id(plan_id) if timer_svc.is_current_datetime_later_than(plan.get_start_on()): # TODO Add task_starter and task_listener orchestrator.execute_plan(plan_id)