# Split the list of bibs into groups to run in parallel
if ( $loops > 1 ) {
my $bibs_per_chunk = ceil( scalar @$bibs_with_pending_requests / $loops );
$bibs_per_chunk = @$bibs_with_pending_requests if @$bibs_with_pending_requests <= $bibs_per_chunk;
my @chunks;
push( @chunks, [ splice @$bibs_with_pending_requests, 0, $bibs_per_chunk ] ) while @$bibs_with_pending_requests;
-