From 028b1b4f1478c6e8ec3ac224c5322cbf4a28452e Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 5 Nov 2010 16:05:58 +0000 Subject: [PATCH] remove some extra rollbacks, and catch the failure of others where they may or may not be needed git-svn-id: svn://svn.open-ils.org/ILS/trunk@18615 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm index 3920bd7770..152b6f8e15 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm @@ -553,7 +553,7 @@ sub import_queue { 'search_vandelay_queued_bib_record' : 'search_vandelay_queued_authority_record'; my $rec_ids = $e->$search($query, {idlist => 1}); my $err = import_record_list_impl($self, $conn, $rec_ids, $e->requestor, $options); - $e->rollback; + try {$e->rollback} otherwise {}; # only using this to make the read authoritative -- don't die from it return $err if $err; return {complete => 1}; } @@ -1034,7 +1034,6 @@ sub import_record_asset_list_impl { if($evt) { respond_with_status($conn, $total, $try_count, $in_count, $evt); - $e->rollback; next; } @@ -1065,12 +1064,11 @@ sub import_record_asset_list_impl { #if($copy->circ_modifier and not $e->retrieve_config_circ_modifier($item->circ_modifier)) { if($copy->circ_modifier and not $e->search_config_circ_modifier({code=>$item->circ_modifier})->[0]) { respond_with_status($conn, $total, $try_count, $in_count, $e->die_event); - $e->rollback; next; } if($evt = OpenILS::Application::Cat::AssetCommon->create_copy($e, $vol, $copy)) { - $e->rollback; + try { $e->rollback } otherwise {}; # sometimes calls die_event, sometimes not respond_with_status($conn, $total, $try_count, $in_count, $evt); next; } @@ -1083,7 +1081,6 @@ sub import_record_asset_list_impl { if($evt) { respond_with_status($conn, $total, $try_count, $in_count, $evt); - $e->rollback; next; } @@ -1092,7 +1089,6 @@ sub import_record_asset_list_impl { if($evt) { respond_with_status($conn, $total, $try_count, $in_count, $evt); - $e->rollback; next; } -- 2.43.2