mirror of
https://git.proxmox.com/git/pve-guest-common
synced 2025-08-13 04:37:27 +00:00
job_status: read only after acquiring the lock
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>
This commit is contained in:
parent
60aeee5fb1
commit
db9eb287d4
@ -234,13 +234,11 @@ sub job_status {
|
|||||||
|
|
||||||
my $jobs = {};
|
my $jobs = {};
|
||||||
|
|
||||||
my $stateobj = read_state();
|
|
||||||
|
|
||||||
my $cfg = PVE::ReplicationConfig->new();
|
|
||||||
|
|
||||||
my $vms = PVE::Cluster::get_vmlist();
|
|
||||||
|
|
||||||
my $func = sub {
|
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}}) {
|
foreach my $jobid (sort keys %{$cfg->{ids}}) {
|
||||||
my $jobcfg = $cfg->{ids}->{$jobid};
|
my $jobcfg = $cfg->{ids}->{$jobid};
|
||||||
my $vmid = $jobcfg->{guest};
|
my $vmid = $jobcfg->{guest};
|
||||||
|
Loading…
Reference in New Issue
Block a user