my $dbhost;
my $batch;
my $cutoff;
-my $wait = 1;
+my $wait = 0;
my $output;
my $link_skipped;
my $marc = MARC::Record->new_from_usmarc($_);
my $bibid = $marc->subfield('901', 'c');
if ($bibid !~ /^\d+$/) {
- print STDERR "Record $i is suspect; skipping\n";
- next;
+ die('Subfield 901$c is not numeric or missing.');
}
my $xml = OpenILS::Application::AppUtils->entityize($marc->as_xml_record());
$ins->execute($xml, $bibid);
};
if ($@) {
- print STDERR "Record $i is bad; skipping\n";
+ warn("Record $i is bad: $@; skipping.");
next;
}
}
)
});
$dbh->commit;
- sleep $wait;
+ sleep $wait if ($wait);
}
}
$ins->execute($xml, $authid, $lccn, $cancelled_lccn, $xml);
};
if ($@) {
- print STDERR "Record $i is bad; skipping\n";
+ warn("Record $i is bad: $@; skipping.");
next;
}
}