From: Wolfgang Bumiller Date: Wed, 28 Jun 2017 07:02:29 +0000 (+0200) Subject: replication: sort time stamps numerically X-Git-Url: https://git.proxmox.com/?p=pve-guest-common.git;a=commitdiff_plain;h=621b955fb83ddb1c05c8e29b97a4c785492d4606 replication: sort time stamps numerically --- diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm index b817f08..74c95f9 100644 --- a/PVE/ReplicationState.pm +++ b/PVE/ReplicationState.pm @@ -299,7 +299,7 @@ sub get_next_job { my $jobb = $jobs->{$b}; my $sa = $joba->{state}; my $sb = $jobb->{state}; - my $res = $sa->{last_iteration} cmp $sb->{last_iteration}; + my $res = $sa->{last_iteration} <=> $sb->{last_iteration}; return $res if $res != 0; $res = $joba->{next_sync} <=> $jobb->{next_sync}; return $res if $res != 0;