Skip to content

Commit

Permalink
hilary review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsutherland committed Feb 15, 2024
1 parent 856d052 commit 7785a88
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
24 changes: 12 additions & 12 deletions cylc/flow/cfgspec/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,18 +802,18 @@ def get_script_common_text(this: str, example: Optional[str] = None):
:ref:`SequentialTasks`.
''')

Conf('sequential xtriggers default', VDR.V_BOOLEAN, False, desc='''
When set to ``True``, parentless tasks that trigger off xtriggers
will only spawn sequentially, i.e. on the satisfaction of the
xtriggers in order. Otherwise, these tasks will all spawn at the
same time up to the runahead limit.
This workflow-wide default can be overridden by a reserved
keyword argument in the xtrigger function declaration and/or
function (``sequential=True/False``).
The presence of one sequential xtrigger on a parentless task with
multiple xtriggers will cause sequential behavior.
Conf('spawn from xtriggers sequentially', VDR.V_BOOLEAN, False,
desc='''
If ``True``, tasks that only depend on xtriggers will not spawn
until their previous (cycle point) instance is satisfied.
Otherwise, they will all spawn at once out to the runahead limit.
This setting can be overridden by a reserved keyword argument in
individual xtrigger declarations, or in xtrigger function
definitions.
One sequential xtrigger on a parentless task with multiple
xtriggers will cause sequential behavior.
''')
with Conf('xtriggers', desc='''
This section is for *External Trigger* function declarations -
Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ def generate_triggers(self, lexpression, left_nodes, right, seq,

if self.xtrigger_mgr is not None:
self.xtrigger_mgr.sequential_xtriggers_default = (
self.cfg['scheduling']['sequential xtriggers default']
self.cfg['scheduling']['spawn from xtriggers sequentially']
)
for label in xtrig_labels:
try:
Expand Down
1 change: 0 additions & 1 deletion cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,6 @@ async def main_loop(self) -> None:
self.pool.queue_task(itask)

if self.xtrigger_mgr.sequential_spawn_next:
# Spawn parentless tasks with sequentially checked xtrigger(s).
self.pool.spawn_parentless_sequential_xtriggers()

if self.xtrigger_mgr.do_housekeeping:
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,8 @@ def _get_spawned_or_merged_task(
is_in_pool:
Was the task found in a pool.
is_xtrig_sequential:
Is the next task occurance spawned on xtrigger satisfaction,
or do all occurances spawn out to the runahead limit.
Is the next task occurrence spawned on xtrigger satisfaction,
or do all occurrence spawn out to the runahead limit.
"""
taskid = Tokens(cycle=str(point), task=tdef.name).relative_id
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cylc-config/00-simple/section1.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hold after cycle point =
stop after cycle point =
cycling mode = integer
runahead limit = P4
sequential xtriggers default = False
spawn from xtriggers sequentially = False
[[queues]]
[[[default]]]
limit = 100
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/xtriggers/04-sequential.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ init_workflow "${TEST_NAME_BASE}" << '__FLOW_CONFIG__'
[scheduling]
initial cycle point = 3000
runahead limit = P5
sequential xtriggers default = True
spawn from xtriggers sequentially = True
[[xtriggers]]
clock_1 = wall_clock(offset=P2Y, sequential=False)
clock_2 = wall_clock()
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_sequential_xtriggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async def test_reload(sequential, start):
# TODO: test setting the sequential argument in [scheduling][xtrigger] items
# changes the behaviour

# TODO: test the interaction between "sequential xtriggers default" and the
# TODO: test the interaction between "spawn from xtriggers sequentially" and the
# sequential argument to [scheduling][xtrigger]
# * Should we be able to override the default by setting sequential=False?
# * Or should that result in a validation error?

0 comments on commit 7785a88

Please sign in to comment.