Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event handlers: improve docs #5655

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@
anywhere the scheduler environment ``$PATH``. They should return quickly.
Multiple event handlers can be specified as a list of command line templates.
For supported template variables see :ref:`task_event_template_variables`.
For supported template variables see :ref:`user_guide.runtime.\
event_handlers.task_event_handling.template_variables`.
Python template substitution syntax is used:
`String Formatting Operations in the Python documentation
<https://docs.python.org/3/library/stdtypes.html
Expand All @@ -461,19 +462,39 @@

TASK_EVENTS_SETTINGS = {
'handlers': '''
Specify a list of command lines or command line templates as generic
task event handlers for each event set in
Commands to run on task :cylc:conf:`[..]handler events`.
A command or list of commands to run for each task event handler
set in
:cylc:conf:`flow.cylc[runtime][<namespace>][events]handler events`.
Information about the event can be provided to the command
using :ref:`user_guide.runtime.event_handlers.\
task_event_handling.template_variables`.
For more information, see
:ref:`user_guide.runtime.task_event_handling`.
For workflow events, see
:ref:`user_guide.scheduler.workflow_event_handling`.
Example::
echo %(event)s occurred in %(workflow)s >> my-log-file
''',
'execution timeout': '''
If a task has not finished after the specified interval, the execution
timeout event handler(s) will be called.
''',
'handler events': '''
A list of events for which :cylc:conf:`[..]handlers` are run.
Specify the events for which the general task event handlers
:cylc:conf:`flow.cylc[runtime][<namespace>][events]handlers`
should be invoked.
See :ref:`user_guide.runtime.task_event_handling` for more information.
Example::
submission failed, failed
Expand Down
Loading