Changeset 362

Show
Ignore:
Timestamp:
08/23/06 22:38:06 (2 years ago)
Author:
bradfitz
Message:

give monitor a bit more time

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/server-newrepl/lib/MogileFS/Worker/Replicate.pm

    r355 r362  
    5050    my $self = shift; 
    5151 
    52     my $run_count = 0; 
     52    # give the monitor job 15 seconds to give us an update 
     53    my $warn_after = time() + 15; 
     54 
    5355    every(2.0, sub { 
    5456        $self->parent_ping; 
     
    5759        # marking things as being available 
    5860        unless ($self->monitor_has_run) { 
    59             # only warn on runs after the first.  gives the monitor job some time to work 
    60             # before we throw a message. 
    61             if ($run_count++ > 0) { 
    62                 error("waiting for monitor job to complete a cycle before beginning replication"); 
    63             } 
     61            error("waiting for monitor job to complete a cycle before beginning replication") 
     62                if time() > $warn_after; 
    6463            return; 
    6564        }