]> dxcluster.org Git - spider.git/commitdiff
allow a bit of slack after midnight waiting for new logfile to appear
authorminima <minima>
Mon, 28 Aug 2000 10:43:46 +0000 (10:43 +0000)
committerminima <minima>
Mon, 28 Aug 2000 10:43:46 +0000 (10:43 +0000)
perl/watchdbg

index 6da3a586a712040d19cff2590ab3c5e85b372009..ca3e2e3b03c134abcbd7ef6b46d0aa63f65864a3 100755 (executable)
@@ -51,7 +51,11 @@ for (;;) {
                my @now = Julian::unixtoj(time()); 
                if ($today[1] != $now[1]) {
                        $fp->close;
-                       $fh = $fp->open(@now) or die $!; 
+                       for (my $i = 0; $i < 20; $i++) {
+                               last if $fh = $fp->open(@now);
+                               sleep 5;
+                       }
+                       die $! if $i >= 20; 
                        @today = @now;
                }
        }