Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emmapeel
puppet-tails
Commits
2593ac85
Commit
2593ac85
authored
Jun 16, 2020
by
sajolida
Browse files
Optimize timing to the schedule of workers (#17755)
parent
bb7742eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
manifests/check_mirrors.pp
View file @
2593ac85
...
...
@@ -70,8 +70,9 @@ class tails::check_mirrors (
],
}
# Full run
cron
{
'tails_check_mirrors'
:
command
=>
"sleep
\$
((
\$
( </dev/urandom od -N2 -t u2 -A none ) >> 5 )) &&
\"
${repo_checkout}
/check-mirrors.rb
\"
"
,
command
=>
"sleep
\$
((
\$
( </dev/urandom od -N2 -t u2 -A none ) >> 5 )) &&
\"
${repo_checkout}
/check-mirrors.rb
--ignore-failures failures.json
\"
"
,
user
=>
$user
,
hour
=>
0
,
minute
=>
16
,
...
...
@@ -89,4 +90,37 @@ class tails::check_mirrors (
environment
=>
[
'TMPDIR=/tmp'
],
}
# Fast run #1: optimized for European morning
cron
{
'tails_check_mirrors'
:
command
=>
"sleep
\$
((
\$
( </dev/urandom od -N2 -t u2 -A none ) >> 5 )) &&
\"
${repo_checkout}
/check-mirrors.rb --store-failures failures.json
\"
"
,
user
=>
$user
,
hour
=>
4
,
minute
=>
16
,
require
=>
[
Vcsrepo
[
$repo_checkout
],
Package
[
$needed_packages
],
Postfix
::
Mailalias
[
$user
],
Exec
[
'Import Tails signing key'
]],
environment
=>
[
"TMPDIR=/tmp"
],
}
# Fast run #2: optimized for American morning
cron
{
'tails_check_mirrors'
:
command
=>
"sleep
\$
((
\$
( </dev/urandom od -N2 -t u2 -A none ) >> 5 )) &&
\"
${repo_checkout}
/check-mirrors.rb --store-failures failures.json
\"
"
,
user
=>
$user
,
hour
=>
12
,
minute
=>
16
,
require
=>
[
Vcsrepo
[
$repo_checkout
],
Package
[
$needed_packages
],
Postfix
::
Mailalias
[
$user
],
Exec
[
'Import Tails signing key'
]],
environment
=>
[
"TMPDIR=/tmp"
],
}
# Fast run #3: to complete the 3 × 8 shifts
cron
{
'tails_check_mirrors'
:
command
=>
"sleep
\$
((
\$
( </dev/urandom od -N2 -t u2 -A none ) >> 5 )) &&
\"
${repo_checkout}
/check-mirrors.rb --store-failures failures.json
\"
"
,
user
=>
$user
,
hour
=>
20
,
minute
=>
16
,
require
=>
[
Vcsrepo
[
$repo_checkout
],
Package
[
$needed_packages
],
Postfix
::
Mailalias
[
$user
],
Exec
[
'Import Tails signing key'
]],
environment
=>
[
"TMPDIR=/tmp"
],
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment