Make --wait optional in eg_staged_bib_overlay.
authorJason Stephenson <jason@sigio.com>
Sat, 6 Aug 2016 21:28:47 +0000 (17:28 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 8 Aug 2016 18:24:06 +0000 (14:24 -0400)
This commit only causes load bibs to wait if the --wait option is
specified with a non-zero value.  It also changes the default for the
global $wait variable that the option is read into to zero.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

eg_staged_bib_overlay

index 836795b..7e57e9a 100755 (executable)
@@ -33,7 +33,7 @@ my $dbpw;
 my $dbhost;
 my $batch;
 my $cutoff;
-my $wait = 1;
+my $wait = 0;
 my $output;
 my $link_skipped;
 
@@ -404,7 +404,7 @@ sub handle_load_bibs {
             )
         });
         $dbh->commit;
-        sleep $wait;
+        sleep $wait if ($wait);
     }
 }