From: erickson Date: Mon, 10 May 2010 22:26:20 +0000 (+0000) Subject: pcrud requires transaction begin/commit for writes... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=94a6784508637823f6a1a2aa7f8bb34f0d5982b6;p=evergreen%2Ftadl.git pcrud requires transaction begin/commit for writes... git-svn-id: svn://svn.open-ils.org/ILS/trunk@16415 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.pl b/Open-ILS/src/support-scripts/marc_stream_importer.pl index ad8d408e8d..d7a0687a9e 100755 --- a/Open-ILS/src/support-scripts/marc_stream_importer.pl +++ b/Open-ILS/src/support-scripts/marc_stream_importer.pl @@ -272,19 +272,25 @@ sub bib_queue_import { } # 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 {