changing sequence of loading bibs so that newest bibs are prioritized which helps...
[migration-tools.git] / eg_staged_bib_overlay
index 4df0cde..d4e788a 100755 (executable)
@@ -387,7 +387,7 @@ sub handle_load_bibs {
                 FROM $schema.$batch
                 WHERE to_import
                 AND NOT imported
-                ORDER BY id
+                ORDER BY bib_id DESC
                 LIMIT 1
             )
         });
@@ -404,7 +404,7 @@ sub handle_load_bibs {
             )
         });
         $dbh->commit;
-        sleep $wait if ($wait);
+        sleep $wait;
     }
 }
 
@@ -594,6 +594,7 @@ sub handle_load_new_auths {
             )
         });
         $dbh->commit;
+        sleep $wait;
     }
 }