-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
136 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=/run/user/${UID}/bus}" | ||
notify-send "Cylc Workflow ${1}" \ | ||
"${CYLC_WORKFLOW_ID}, ${1}. \nMessage Sent by event handler." \ | ||
--icon face-sad \ | ||
--app-name "Cylc - Workflow Stalled" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[meta] | ||
description = """ | ||
Showcase of interesting apps. | ||
""" | ||
|
||
[scheduler] | ||
[[events]] | ||
stall handlers = gnome-message stall | ||
|
||
[scheduling] | ||
[[graph]] | ||
R1 = """ | ||
gnome_message | ||
""" | ||
|
||
[runtime] | ||
[[gnome_message]] | ||
script = """ | ||
export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=/run/user/${UID}/bus}" | ||
notify-send "Hello World" \ | ||
"Here's any old message." \ | ||
--icon face-smile \ | ||
--app-name "Cylc Notify Demo" | ||
exit 1 | ||
""" | ||
err-script = """ | ||
export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=/run/user/${UID}/bus}" | ||
notify-send "Cylc Task Failed" \ | ||
"${CYLC_WORKFLOW_ID}//${CYLC_TASK_ID}\nMessage sent by error script." \ | ||
--icon face-sad \ | ||
--app-name "Cylc Notify Demo" | ||
""" | ||
[[[meta]]] | ||
description = """ | ||
Send a message to Gnome. | ||
Probably only works on --host=localhost. | ||
Hint - list of icons... | ||
find /usr/share/icons/* -name "*.png" | ||
""" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!jinja2 | ||
[meta] | ||
description = This is a workflow created by a script.. | ||
created on = 2024-11-11T13:7 | ||
|
||
[task parameters] | ||
assimilation_job = 1..12 | ||
forecast_job = 1..12 | ||
pp_job = 1..6 | ||
|
||
[scheduler] | ||
allow implicit tasks = True | ||
cycle point format = %Y | ||
|
||
[scheduling] | ||
initial cycle point = 1971 | ||
[[graph]] | ||
R1 = install_cold & get_archive_data => start_cycle | ||
P1Y = """ | ||
FORECAST[-P1Y]:succeed-all => start_cycle => | ||
ASSIMILATION:succeed-all => _skip2 => FORECAST | ||
""" | ||
P5Y = """ | ||
FORECAST[-P4Y]:succeed-all => skip3 | ||
FORECAST[-P3Y]:succeed-all => skip3 | ||
FORECAST[-P2Y]:succeed-all => skip3 | ||
FORECAST[-P1Y]:succeed-all => skip3 | ||
FORECAST:succeed-all => skip3 | ||
skip3 => POSTPROC:finish-all => archive => mousekeep | ||
""" | ||
|
||
|
||
[runtime] | ||
[[root]] | ||
script = """ | ||
echo "Hello World!" | ||
max=$(((RANDOM % 20) + 1)) | ||
sleepy=$(((max + 10) - (RANDOM % max))) | ||
printf "This script will sleep for %d\n" "$sleepy" | ||
cylc message -- "INFO:Sleep $sleepy" | ||
sleep "$sleepy" | ||
echo "The script has finished sleeping" | ||
""" | ||
[[HOUSEKEEPING]] | ||
[[BIG_SLURMJOB]] | ||
[[WEE_SLURMJOB]] | ||
[[ASSIMILATION]] | ||
[[FORECAST]] | ||
[[POSTPROC]] | ||
[[FLOWCONTROL]] | ||
|
||
[[install_cold, get_archive_data, mousekeep, archive]] | ||
inherit = HOUSEKEEPING, WEE_SLURMJOB | ||
|
||
[[assimilation<assimilation_job>]] | ||
inherit = ASSIMILATION, WEE_SLURMJOB | ||
|
||
[[forecast<forecast_job>]] | ||
inherit = FORECAST, BIG_SLURMJOB | ||
|
||
[[pp<pp_job>]] | ||
inherit = POSTPROC | ||
|
||
[[mousekeep]] | ||
inherit = HOUSEKEEPING | ||
|
||
[[start_cycle, skip3, _skip2]] | ||
inherit = FLOWCONTROL | ||
script = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters