[pve-devel] [PATCH pve-manager] PVE/API2/Replication.pm: add $verbose parameter run_jobs()

Dietmar Maurer dietmar at proxmox.com
Tue Jun 20 10:52:38 CEST 2017


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 PVE/API2/Replication.pm        | 6 +++---
 bin/test/ReplicationTestEnv.pm | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm
index c4a37e4b..117fe57d 100644
--- a/PVE/API2/Replication.pm
+++ b/PVE/API2/Replication.pm
@@ -72,9 +72,9 @@ sub run_single_job {
     die $@ if $@;
 }
 
-# passing $now is useful for regression testing
+# passing $now and $verbose is useful for regression testing
 sub run_jobs {
-    my ($now, $logfunc) = @_;
+    my ($now, $logfunc, $verbose) = @_;
 
     my $iteration = $now // time();
 
@@ -83,7 +83,7 @@ sub run_jobs {
 
        while (my $jobcfg = PVE::ReplicationState::get_next_job($iteration, $start_time)) {
            my $guest_class = $lookup_guest_class->($jobcfg->{vmtype});
-           PVE::Replication::run_replication($guest_class, $jobcfg, $iteration, $start_time, $logfunc, 1);
+           PVE::Replication::run_replication($guest_class, $jobcfg, $iteration, $start_time, $logfunc, 1, $verbose);
            $start_time = $now // time();
        }
     };
diff --git a/bin/test/ReplicationTestEnv.pm b/bin/test/ReplicationTestEnv.pm
index 429b2e12..d54d9fd6 100755
--- a/bin/test/ReplicationTestEnv.pm
+++ b/bin/test/ReplicationTestEnv.pm
@@ -293,7 +293,7 @@ sub track_jobs {
 	}
     }
 
-    PVE::API2::Replication::run_jobs($ctime, $logmsg);
+    PVE::API2::Replication::run_jobs($ctime, $logmsg, 1);
 
     my $new = PVE::ReplicationState::job_status();
 
-- 
2.11.0




More information about the pve-devel mailing list