Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Jan 29, 2020
1 parent 29a1775 commit b961362
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
16 changes: 5 additions & 11 deletions cylc/flow/network/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,15 +1286,9 @@ class Meta:
description = sstrip(f'''
Tell a suite server program to shut down.
In order to prevent failures going unnoticed, suites only shut down
automatically at a final cycle point if no failed tasks are
present. There are several shutdown methods:
Tasks that become ready after the shutdown is ordered will be
submitted immediately if the suite is restarted. Remaining task
event handlers and job poll and kill commands, however, will be
executed prior to shutdown, unless the stop mode is
`{StopMode.REQUEST_NOW}`.
By default suites wait for all submitted and running tasks to
complete before shutting down. You can change this behaviour
with the "mode" option.
''')
resolver = partial(mutator, command='stop_workflow')

Expand Down Expand Up @@ -1459,7 +1453,7 @@ class Meta:
Remove one or more task instances from a running workflow.
Tasks will be forced to spawn successors before removal if they
have not done so already, unless you use `no_spawn`.
have not done so already, unless you change the `spawn` option.
''')
resolver = partial(mutator, command='remove_tasks')

Expand All @@ -1477,7 +1471,7 @@ class Meta:
Outputs are automatically updated to reflect the new task state,
except for custom message outputs which can be manipulated directly
with `output`.
with `outputs`.
Prerequisites reflect the state of other tasks; they are not
changed except to unset them on resetting state to
Expand Down
13 changes: 7 additions & 6 deletions cylc/flow/network/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ def broadcast(
if mode == 'clear_broadcast':
return self.schd.task_events_mgr.broadcast_mgr.clear_broadcast(
cycle_points, tasks, settings)
raise ValueError('TEMP: TODO: FixMe!')
# TODO implement other broadcast interfaces (i.e. expire, display)
raise ValueError('Unsupported broadcast mode')

@authorise(Priv.READ)
@expose
Expand Down Expand Up @@ -412,7 +413,7 @@ def dry_run_tasks(self, tasks, check_syntax=True):
"""Prepare job file for a task.
Args:
task_globs (list): List of identifiers, see `task globs`_
task (list): List of identifiers, see `task globs`_
check_syntax (bool, optional): Check shell syntax.
Returns:
Expand Down Expand Up @@ -755,9 +756,9 @@ def insert_tasks(self, tasks, stop_point=None, check_point=True):
any glob characters (``*``).
stop_point (str, optional):
Optional hold/stop cycle point for inserted task.
no_check (bool, optional):
Add task even if the provided cycle point is not valid
for the given task.
check_point (bool, optional):
If True check that the cycle point is valid for the
given task and fail if it is not.
Returns:
tuple: (outcome, message)
Expand Down Expand Up @@ -863,7 +864,7 @@ def poll_tasks(self, tasks=None, poll_succeeded=False):
Args:
tasks (list, optional):
List of identifiers, see `task globs`_
poll_succ (bool, optional):
poll_succeeded (bool, optional):
Allow polling of remote tasks if True.
Returns:
Expand Down
18 changes: 15 additions & 3 deletions cylc/flow/suite_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,23 @@ def describe(self):
if self == self.AUTO_ON_TASK_FAILURE:
return 'Wait until the first task fails.'
if self == self.REQUEST_CLEAN:
return 'Wait for active jobs to complete.'
return (
'Regular shutdown:\n'
'* Wait for all active jobs to complete.\n'
'* Run suite event handlers and wait for them to complete.'
)
if self == self.REQUEST_NOW:
return 'Immediate shutdown, wait for event handlers to complete.'
return (
'Immediate shutdown\n'
"* Don't kill submitted or running jobs.\n"
'* Run suite event handlers and wait for them to complete.'
)
if self == self.REQUEST_NOW_NOW:
return 'Immediate shutdown.'
return (
'Immediate shutdown\n'
"* Don't kill submitted or running jobs.\n"
"* Don't run event handlers."
)
return ''


Expand Down

0 comments on commit b961362

Please sign in to comment.