[open-ils-commits] r18616 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Nov 5 12:07:07 EDT 2010


Author: miker
Date: 2010-11-05 12:07:04 -0400 (Fri, 05 Nov 2010)
New Revision: 18616

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
remove some extra rollbacks, and catch the failure of others where they may or may not be needed

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-11-05 16:05:58 UTC (rev 18615)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-11-05 16:07:04 UTC (rev 18616)
@@ -553,7 +553,7 @@
         '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 @@
 
             if($evt) {
                 respond_with_status($conn, $total, $try_count, $in_count, $evt);
-                $e->rollback;
                 next;
             }
 
@@ -1065,12 +1064,11 @@
             #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 @@
 
             if($evt) {
                 respond_with_status($conn, $total, $try_count, $in_count, $evt);
-                $e->rollback;
                 next;
             }
 
@@ -1092,7 +1089,6 @@
 
             if($evt) {
                 respond_with_status($conn, $total, $try_count, $in_count, $evt);
-                $e->rollback;
                 next;
             }
 



More information about the open-ils-commits mailing list