to get the current replication config and have the VM list
and state object as recent as possible.
Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
my $jobs = {};
- my $stateobj = read_state();
-
- my $cfg = PVE::ReplicationConfig->new();
-
- my $vms = PVE::Cluster::get_vmlist();
-
my $func = sub {
+ my $stateobj = read_state();
+ my $cfg = PVE::ReplicationConfig->new();
+ my $vms = PVE::Cluster::get_vmlist();
+
foreach my $jobid (sort keys %{$cfg->{ids}}) {
my $jobcfg = $cfg->{ids}->{$jobid};
my $vmid = $jobcfg->{guest};