Skip to content

Commit

Permalink
Suggestions from review.
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Sanders <[email protected]>
  • Loading branch information
wxtim and oliver-sanders committed Sep 19, 2024
1 parent d354fad commit e2703ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
8 changes: 6 additions & 2 deletions cylc/flow/run_modes/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ def submit_task_job(
itask.submit_num += 1

itask.platform = {
'name': RunMode.SIMULATION.value, 'install target': 'localhost'}
itask.platform['name'] = RunMode.SIMULATION.value
'name': RunMode.SIMULATION.value,
'install target': 'localhost',
'hosts': ['localhost'],
'disable task event handlers':
rtconfig['simulation']['disable task event handlers'],
}
itask.summary['job_runner_name'] = RunMode.SIMULATION.value
itask.summary[task_job_mgr.KEY_EXECUTE_TIME_LIMIT] = (
itask.mode_settings.simulated_run_length
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/run_modes/skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def submit_task_job(
task_job_mgr: 'TaskJobManager',
itask: 'TaskProxy',
rtconfig: Dict,
_workflow: str,
now: Tuple[float, str]
) -> 'Literal[True]':
"""Submit a task in skip mode.
Expand All @@ -63,7 +64,6 @@ def submit_task_job(
rtconfig['skip']['disable task event handlers'],
'execution polling intervals': []
}
itask.platform['name'] = RunMode.SKIP.value
itask.summary['job_runner_name'] = RunMode.SKIP.value
itask.run_mode = RunMode.SKIP.value
task_job_mgr.workflow_db_mgr.put_insert_task_jobs(
Expand Down
1 change: 0 additions & 1 deletion cylc/flow/task_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ def iter_required_messages(
set(self._message_to_compvar.values()),
force_optional=exclude
).items():
# breakpoint(header=f"=== {compvar=}, {is_optional=} ===")
if is_optional is False:
for message, _compvar in self._message_to_compvar.items():
if _compvar == compvar:
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/task_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def describe(self):
@staticmethod
def get(options: 'Values') -> str:
"""Return the workflow run mode from the options."""
return getattr(options, 'run_mode', None) or RunMode.LIVE.value
return getattr(options, 'run_mode', RunMode.LIVE.value)

@staticmethod
def disable_task_event_handlers(itask):
Expand Down

0 comments on commit e2703ec

Please sign in to comment.