]> git.proxmox.com Git - pve-guest-common.git/blobdiff - PVE/ReplicationState.pm
replication: keep retrying every 30 minutes in error state
[pve-guest-common.git] / PVE / ReplicationState.pm
index 5401db60f9dbb9f2df9189069a0c0cc2cfc84bcd..f82bb5c1a613f3e832a6f74105c7d8f901daa023 100644 (file)
@@ -257,9 +257,7 @@ sub job_status {
            # todo: consider fail_count? How many retries?
        } else  {
            if (my $fail_count = $state->{fail_count}) {
-               if ($fail_count < 3) {
-                   $next_sync = $state->{last_try} + 5*60*$fail_count;
-               }
+               $next_sync = $state->{last_try} + 60*($fail_count < 3 ? 5*$fail_count : 30);
            } else {
                my $schedule =  $jobcfg->{schedule} || '*/15';
                my $calspec = PVE::CalendarEvent::parse_calendar_event($schedule);