Skip to content

Commit

Permalink
TEMP: use case examples [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Aug 15, 2023
1 parent 0e97252 commit 53adcb9
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
33 changes: 33 additions & 0 deletions cylc-src/set/ex1/flow.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# "cylc reset" should set required outputs just like natural completion:
# - spawn children
# - trigger event handlers
# - complete an incomplete task

[scheduling]
[[graph]]
R1 = """
foo-reset # test default reset
foo => foo-post

bar? => bar-post
bar:fail? => bar-reset # test explicit reset
"""

[runtime]
[[foo, bar]]
script = false
[[[events]]]
succeeded handlers = "echo !!!! SUCCEEDED !!!!"

[[foo-reset]]
script = """
cylc__job__poll_grep_workflow_log -E "1/foo .*failed"
cylc reset "${CYLC_WORKFLOW_ID}//1/foo"
"""

[[bar-reset]]
script = """
cylc reset --out=succeeded "${CYLC_WORKFLOW_ID}//1/bar"
"""
[[foo-post, bar-post]]
script = true
16 changes: 16 additions & 0 deletions cylc-src/set/ex2/flow.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[scheduling]
[[graph]]
R1 = """
long
a => b => c
a_cold => a
b_cold => b
c_cold => c
"""

[runtime]
[[long]]
script = sleep 600

[[a, b, c, a_cold, b_cold, c_cold]]
script = true
9 changes: 9 additions & 0 deletions cylc-src/set/ex4/flow.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[scheduling]
[[graph]]
R1 = """
long # kill me
"""

[runtime]
[[long]]
script = sleep 600

0 comments on commit 53adcb9

Please sign in to comment.