Commit 2593ac85 authored by sajolida's avatar sajolida
Browse files

Optimize timing to the schedule of workers (#17755)

parent bb7742eb
......@@ -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" ],
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment