From: Dietmar Maurer Date: Thu, 4 Dec 2014 10:33:21 +0000 (+0100) Subject: fix loop_count X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=498246b9ab29ffdb7db6040a9a5991c2ead31171;p=pve-ha-manager.git fix loop_count --- diff --git a/PVE/HA/Env.pm b/PVE/HA/Env.pm index 18d5beb..026aeff 100644 --- a/PVE/HA/Env.pm +++ b/PVE/HA/Env.pm @@ -6,7 +6,7 @@ use warnings; use PVE::SafeSyslog; use PVE::Tools; -# abstract out the cluster environment +# abstract out the cluster environment for a single node sub new { my ($this, $statusdir, $nodename) = @_; diff --git a/PVE/HA/SimCluster.pm b/PVE/HA/SimCluster.pm index ed6423b..0b71a98 100644 --- a/PVE/HA/SimCluster.pm +++ b/PVE/HA/SimCluster.pm @@ -206,6 +206,8 @@ sub run { $self->sim_cluster_cmd($cmd); } } + + ++$self->{loop_count}; } } diff --git a/PVE/HA/SimEnv.pm b/PVE/HA/SimEnv.pm index 8947bac..0656e30 100644 --- a/PVE/HA/SimEnv.pm +++ b/PVE/HA/SimEnv.pm @@ -55,8 +55,6 @@ sub new { $self->{cur_time} = 0; $self->{loop_delay} = 0; - $self->{loop_count} = 0; - return $self; } @@ -304,8 +302,6 @@ sub loop_start_hook { sub loop_end_hook { my ($self) = @_; - ++$self->{loop_count}; - my $delay = $self->{loop_delay}; $self->{loop_delay} = 0;