Skip to content

Commit

Permalink
response to review
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Sep 12, 2023
1 parent 81ff394 commit caa068a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 0 additions & 2 deletions cylc/flow/task_events_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ def process_message(
self.setup_event_handlers(
itask, self.EVENT_STARTED, f'job {self.EVENT_STARTED}')
self.spawn_func(itask, TASK_OUTPUT_STARTED)

if message == self.EVENT_STARTED:
if (
flag == self.FLAG_RECEIVED
Expand Down Expand Up @@ -795,7 +794,6 @@ def _process_message_check(
TimerFlags.EXECUTION_RETRY].num > 0
)
)

):
# Ignore messages if task has a retry lined up
# (caused by polling overlapping with task failure)
Expand Down
16 changes: 14 additions & 2 deletions cylc/flow/task_job_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,15 +1000,27 @@ def _simulation_submit_task_jobs(self, itasks, workflow):
itask.waiting_on_job_prep = False
itask.submit_num += 1
self._set_retry_timers(itask)
itask.platform = {'name': 'SIMULATION'}

# We largely want a clean "platform" and not localhost,
# but we need to get the existing submission retry delays
# to stop _set_retry_delays missing it on retry.
itask.platform = {
'name': 'SIMULATION',
'submission retry delays':
itask.platform['submission retry delays']
}
itask.summary['job_runner_name'] = 'SIMULATION'
itask.summary[self.KEY_EXECUTE_TIME_LIMIT] = (
itask.tdef.rtconfig['simulation']['simulated run length']
)
itask.jobs.append(
self.get_simulation_job_conf(itask, workflow)
)
itask.state.status = TASK_STATUS_PREPARING

# Set status from waiting to preparing to prevent
# _process_message_check returning false because
# state is waiting.
itask.state.status = 'preparing'
self.task_events_mgr.process_message(
itask, INFO, TASK_OUTPUT_SUBMITTED,
)
Expand Down

0 comments on commit caa068a

Please sign in to comment.