]> git.proxmox.com Git - pve-manager.git/blobdiff - PVE/API2/Replication.pm
PVE/API2/Replication.pm: call purge_old_states in run_jobs
[pve-manager.git] / PVE / API2 / Replication.pm
index 08e2a06b90c4e335bdbd9e0a5d0db564ddab3586..2a4bf537af58e5b4be8822281ad07f8ee38cbf4e 100644 (file)
@@ -81,6 +81,8 @@ sub run_jobs {
     my $code = sub {
        my $start_time = $now // time();
 
+       PVE::ReplicationState::purge_old_states();
+
        while (my $jobcfg = PVE::ReplicationState::get_next_job($iteration, $start_time)) {
            my $guest_class = $lookup_guest_class->($jobcfg->{vmtype});
            PVE::Replication::run_replication($guest_class, $jobcfg, $iteration, $start_time, $logfunc, 1, $verbose);