Skip to content

Commit

Permalink
Merge pull request #3492 from oliver-sanders/main-loop-plugins
Browse files Browse the repository at this point in the history
main loop: plugins for periodic functions
  • Loading branch information
kinow authored Apr 7, 2020
2 parents f5b8cb0 + 38822a8 commit 15d30a9
Show file tree
Hide file tree
Showing 40 changed files with 2,362 additions and 251 deletions.
3 changes: 2 additions & 1 deletion cylc/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import logging


LOG = logging.getLogger('cylc') # Acceptable?
CYLC_LOG = 'cylc'
LOG = logging.getLogger(CYLC_LOG)
LOG.addHandler(logging.NullHandler()) # Start with a null handler


Expand Down
10 changes: 9 additions & 1 deletion cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
# suite
'cylc': {
'UTC mode': [VDR.V_BOOLEAN],
'health check interval': [VDR.V_INTERVAL, DurationFloat(600)],
'task event mail interval': [VDR.V_INTERVAL, DurationFloat(300)],
'events': {
'handlers': [VDR.V_STRING_LIST],
Expand All @@ -67,6 +66,15 @@
'abort on inactivity': [VDR.V_BOOLEAN],
'abort on stalled': [VDR.V_BOOLEAN],
},
'main loop': {
'plugins': [VDR.V_STRING_LIST, ['health check']],
'health check': {
'interval': [VDR.V_INTERVAL, DurationFloat(600)]
},
'__MANY__': {
'interval': [VDR.V_INTERVAL]
}
}
},

# suite
Expand Down
9 changes: 8 additions & 1 deletion cylc/flow/cfgspec/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@
VDR.V_STRING, '', 'live', 'dummy', 'dummy-local', 'simulation'],
'force run mode': [
VDR.V_STRING, '', 'live', 'dummy', 'dummy-local', 'simulation'],
'health check interval': [VDR.V_INTERVAL],
'task event mail interval': [VDR.V_INTERVAL],
'disable automatic shutdown': [VDR.V_BOOLEAN],
'main loop': {
'__MANY__': {
'interval': [VDR.V_INTERVAL],
}
},
'simulation': {
'disable suite event handlers': [VDR.V_BOOLEAN, True],
},
Expand Down Expand Up @@ -301,6 +305,9 @@ def upg(cfg, descr):
u.obsolete(
'8.0.0',
['cylc', 'reference test', 'suite shutdown event handler'])
u.obsolete(
'8.0.0',
['cylc', 'health check interval'])
u.deprecate(
'8.0.0',
['cylc', 'abort if any task fails'],
Expand Down
Loading

0 comments on commit 15d30a9

Please sign in to comment.