So the repeat frequency for a stuck job is now:
t0 -> fails
t1 = t0 + 5m -> repat
t2 = t1 + 10m = t0 + 15m -> repat
t3 = t2 + 15m = t0 + 30m -> repat
t4 = t3 + 30m = t0 + 60-> repat
then
tx = tx-1 + 30m -> repat
So, we converge more naturally/stable to the 30m intervals than
before, when t3 would have been t0 + 45m.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
if (my $fail_count = $state->{fail_count}) {
my $members = PVE::Cluster::get_members();
if (!$fail_count || ($members->{$target} && $members->{$target}->{online})) {
- $next_sync = $state->{last_try} + 60*($fail_count < 3 ? 5*$fail_count : 30);
+ $next_sync = $state->{last_try} + 60 * ($fail_count <= 3 ? 5 * $fail_count : 30);
}
} else {
my $schedule = $jobcfg->{schedule} || '*/15';