[pve-devel] [PATCH pve-manager 10/18] PVE::Replication::run_jobs - fix job start time

Wolfgang Bumiller w.bumiller at proxmox.com
Tue May 23 10:55:09 CEST 2017


On Tue, May 23, 2017 at 09:08:49AM +0200, Dietmar Maurer wrote:
> Value $now is ment for use inside regression tests. Normally
> a job should get the actual start time.
> 
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
>  PVE/Replication.pm | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/PVE/Replication.pm b/PVE/Replication.pm
> index f273cda3..7bfdeb7d 100644
> --- a/PVE/Replication.pm
> +++ b/PVE/Replication.pm
> @@ -259,11 +259,10 @@ sub run_jobs {
>      my ($now, $logfunc) = @_; # useful for regression testing
>  
>      my $code = sub {
> -	$now //= time();
> -
>  	my $stateobj = $read_state->();
>  
>  	while (my $jobcfg = $get_next_job->($stateobj, $now)) {
> +	    my $start_time = $now // time();

But you're not passing this to $run_replication below...

>  	    $run_replication->($stateobj, $jobcfg, $now, $logfunc);
>  	}
>      };
> -- 
> 2.11.0




More information about the pve-devel mailing list