Skip to content

Commit 47b74ae

Browse files
committed
Ensure workflow status updates when stop/hold point set
1 parent 7b2cf8e commit 47b74ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cylc/flow/commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,19 @@ async def stop(
189189
schd.workflow_db_mgr.put_workflow_stop_cycle_point(
190190
schd.options.stopcp
191191
)
192+
schd._update_workflow_state()
192193
elif clock_time is not None:
193194
# schedule shutdown after wallclock time passes provided time
194195
parser = TimePointParser()
195196
schd.set_stop_clock(
196197
int(parser.parse(clock_time).seconds_since_unix_epoch)
197198
)
199+
schd._update_workflow_state()
198200
elif task is not None:
199201
# schedule shutdown after task succeeds
200202
task_id = TaskID.get_standardised_taskid(task)
201203
schd.pool.set_stop_task(task_id)
204+
schd._update_workflow_state()
202205
else:
203206
# immediate shutdown
204207
with suppress(KeyError):
@@ -229,6 +232,7 @@ async def release_hold_point(schd: 'Scheduler'):
229232
yield
230233
LOG.info("Releasing all tasks and removing hold cycle point.")
231234
schd.pool.release_hold_point()
235+
schd._update_workflow_state()
232236

233237

234238
@_command('resume')
@@ -287,6 +291,7 @@ async def set_hold_point(schd: 'Scheduler', point: str):
287291
"All tasks after this point will be held."
288292
)
289293
schd.pool.set_hold_point(cycle_point)
294+
schd._update_workflow_state()
290295

291296

292297
@_command('pause')

0 commit comments

Comments
 (0)