Skip to content

Commit

Permalink
Simplify the default schedules, omitting the interval part when possible
Browse files Browse the repository at this point in the history
The scheduler computes the interval as the lengh of the timerange + 1 minute,
so no need to clutter the schedule syntax in the defaults with that information.
  • Loading branch information
cvaroqui committed Mar 18, 2018
1 parent e9a6df8 commit 45591f8
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions lib/node.py
Expand Up @@ -77,9 +77,9 @@

CONFIG_DEFAULTS = {
"node_env": "TST",
"push_schedule": "00:00-06:00@361 mon-sun",
"sync_schedule": "04:00-06:00@121 mon-sun",
"comp_schedule": "02:00-06:00@241 sun",
"push_schedule": "00:00-06:00",
"sync_schedule": "04:00-06:00",
"comp_schedule": "02:00-06:00",
"collect_stats_schedule": "@10",
"no_schedule": "",
}
Expand Down
16 changes: 8 additions & 8 deletions lib/nodedict.py
Expand Up @@ -504,7 +504,7 @@ def __init__(self):
section="sysreport",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'sysreport' node action, which check all modules and fix only modules flagged 'autofix'. See usr/share/doc/schedule for the schedule syntax."
)

Expand All @@ -515,7 +515,7 @@ def __init__(self):
section="compliance",
keyword="schedule",
order=15,
default="02:00-06:00@241 sun",
default="02:00-06:00",
text="Schedule parameter for the 'compliance auto' node action, which check all modules and fix only modules flagged 'autofix'. See usr/share/doc/schedule for the schedule syntax."
)

Expand All @@ -538,7 +538,7 @@ def __init__(self):
section="stats",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'pushstats' node action. See usr/share/doc/schedule for the schedule syntax."
)

Expand All @@ -561,7 +561,7 @@ def __init__(self):
section="checks",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'pushchecks' node action. See usr/share/doc/schedule for the schedule syntax."
)

Expand All @@ -572,7 +572,7 @@ def __init__(self):
section="packages",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'pushpkg' node action. See usr/share/doc/schedule for the schedule syntax."
)

Expand All @@ -583,7 +583,7 @@ def __init__(self):
section="patches",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'pushpatch' node action. See usr/share/doc/schedule for the schedule syntax."
)

Expand All @@ -594,7 +594,7 @@ def __init__(self):
section="asset",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'pushasset' node action. See usr/share/doc/schedule for the schedule syntax."
)

Expand Down Expand Up @@ -695,7 +695,7 @@ def __init__(self):
section="disks",
keyword="schedule",
order=15,
default="00:00-06:00@361 mon-sun",
default="00:00-06:00",
text="Schedule parameter for the 'pushdisks' node action. See usr/share/doc/schedule for the schedule syntax."
)

Expand Down
4 changes: 2 additions & 2 deletions lib/svc.py
Expand Up @@ -119,8 +119,8 @@ def signal_handler(*args):

CONFIG_DEFAULTS = {
'sync#i0_schedule': '@60',
'sync_schedule': '04:00-06:00@121',
'comp_schedule': '00:00-06:00@361',
'sync_schedule': '04:00-06:00',
'comp_schedule': '00:00-06:00',
'status_schedule': '@9',
'monitor_schedule': '@1',
'resinfo_schedule': '@60',
Expand Down
4 changes: 2 additions & 2 deletions usr/share/doc/template.node.asset.conf
Expand Up @@ -10,11 +10,11 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'pushasset' node action. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

4 changes: 2 additions & 2 deletions usr/share/doc/template.node.checks.conf
Expand Up @@ -10,11 +10,11 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'pushchecks' node action. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

4 changes: 2 additions & 2 deletions usr/share/doc/template.node.compliance.conf
Expand Up @@ -10,14 +10,14 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 02:00-06:00@241 sun
# default: 02:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'compliance auto' node action, which
# check all modules and fix only modules flagged 'autofix'. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 02:00-06:00@241 sun
;schedule = 02:00-06:00

#
# keyword: auto_update
Expand Down
4 changes: 2 additions & 2 deletions usr/share/doc/template.node.disks.conf
Expand Up @@ -10,11 +10,11 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'pushdisks' node action. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

4 changes: 2 additions & 2 deletions usr/share/doc/template.node.node.conf
Expand Up @@ -10,13 +10,13 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 10%
# default: 2%
# scope order: specific > generic
# convert: size
#
# desc: The minimum required available memory to allow orchestration.
#
;min_avail_mem = 10%
;min_avail_mem = 2%

#
# keyword: min_avail_swap
Expand Down
4 changes: 2 additions & 2 deletions usr/share/doc/template.node.packages.conf
Expand Up @@ -10,11 +10,11 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'pushpkg' node action. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

4 changes: 2 additions & 2 deletions usr/share/doc/template.node.patches.conf
Expand Up @@ -10,11 +10,11 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'pushpatch' node action. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

4 changes: 2 additions & 2 deletions usr/share/doc/template.node.stats.conf
Expand Up @@ -10,13 +10,13 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'pushstats' node action. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

#
# keyword: disable
Expand Down
4 changes: 2 additions & 2 deletions usr/share/doc/template.node.sysreport.conf
Expand Up @@ -10,12 +10,12 @@
# ----------------------------------------------------------------------------
# scopable: False
# required: False
# default: 00:00-06:00@361 mon-sun
# default: 00:00-06:00
# scope order: specific > generic
#
# desc: Schedule parameter for the 'sysreport' node action, which check all
# modules and fix only modules flagged 'autofix'. See
# usr/share/doc/schedule for the schedule syntax.
#
;schedule = 00:00-06:00@361 mon-sun
;schedule = 00:00-06:00

0 comments on commit 45591f8

Please sign in to comment.