[open-ils-commits] r16415 - trunk/Open-ILS/src/support-scripts (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon May 10 18:26:26 EDT 2010
Author: erickson
Date: 2010-05-10 18:26:20 -0400 (Mon, 10 May 2010)
New Revision: 16415
Modified:
trunk/Open-ILS/src/support-scripts/marc_stream_importer.pl
Log:
pcrud requires transaction begin/commit for writes...
Modified: trunk/Open-ILS/src/support-scripts/marc_stream_importer.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/marc_stream_importer.pl 2010-05-10 19:48:15 UTC (rev 16414)
+++ trunk/Open-ILS/src/support-scripts/marc_stream_importer.pl 2010-05-10 22:26:20 UTC (rev 16415)
@@ -272,19 +272,25 @@
}
# clean up the successfully imported vandelay records to prevent queue bloat
+ my $pcrud = OpenSRF::AppSession->create('open-ils.pcrud');
+ $pcrud->connect;
+ $pcrud->request('open-ils.pcrud.transaction.begin', $authtoken);
+ my $err;
+
foreach (@cleanup_recs) {
try {
- $apputils->simplereq(
- 'open-ils.pcrud',
- 'open-ils.pcrud.delete.vqbr',
- $authtoken, $_);
+ $pcrud->request('open-ils.pcrud.delete.vqbr', $authtoken, $_);
+
} catch Error with {
- my $err = shift;
+ $err = shift;
$logger->error("Error deleteing queued bib record $_: $err");
};
}
+
+ $pcrud->request('open-ils.pcrud.transaction.commit', $authtoken) unless $err;
+ $pcrud->disconnect;
}
sub process_batch_data {
More information about the open-ils-commits
mailing list