From daab851dc1b513bdde0127f6956670be709b1dce Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Wed, 22 Aug 2012 17:10:59 -0300 Subject: [PATCH] TableSyncer: precedence and output issue in TableSyncer --- lib/TableSyncer.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/TableSyncer.pm b/lib/TableSyncer.pm index 30fa3de4..a7b75760 100644 --- a/lib/TableSyncer.pm +++ b/lib/TableSyncer.pm @@ -513,9 +513,10 @@ sub lock_and_wait { my $ms = $self->{MasterSlave}; my $tries = $args{wait_retry_args}->{tries} || 3; my $wait; + my $sleep = $args{wait_retry_args}->{wait} || 10; $self->{Retry}->retry( tries => $tries, - wait => sub { sleep $args{wait_retry_args}->{wait} || 10 }, + wait => sub { sleep($sleep) }, try => sub { my ( %args ) = @_; # Be careful using $args{...} in this callback! %args in @@ -558,7 +559,7 @@ sub lock_and_wait { . "the slave is running."; } if ( $tries - $args{tryno} ) { - $msg .= " Sleeping $wait seconds then retrying " + $msg .= " Sleeping $sleep seconds then retrying " . ($tries - $args{tryno}) . " more times."; } warn "$msg\n";