From 98a23d37b536bf6997d23b9bd86cb57bf5507d7f Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 9 Oct 2008 22:17:00 +0000 Subject: [PATCH] make sure we rollback the aborted transactions so they are not sticking around. git-svn-id: svn://svn.open-ils.org/ILS/trunk@10811 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Vandelay.pm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm index 680ab450bd..534ed56dc0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm @@ -547,10 +547,15 @@ sub import_record_list_impl { my $rec = $e->retrieve_vandelay_queued_bib_record($rec_id) ; unless($rec) { $conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $e->die_event}); + $e->rollback; + next; + } + + if($rec->import_time) { + $e->rollback; next; } - next if $rec->import_time; $queues{$rec->queue} = 1; my $record; @@ -566,6 +571,7 @@ sub import_record_list_impl { if($U->event_code($record)) { $conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $record}); + $e->rollback; next; } $rec->imported_as($record->id); @@ -573,6 +579,7 @@ sub import_record_list_impl { unless($e->update_vandelay_queued_bib_record($rec)) { $conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $e->die_event}); + $e->rollback; next; } @@ -581,10 +588,15 @@ sub import_record_list_impl { my $rec = $e->retrieve_vandelay_queued_authority_record($rec_id); unless($rec) { $conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $e->die_event}); + $e->rollback; + next; + } + + if($rec->import_time) { + $e->rollback; next; } - next if $rec->import_time; $queues{$rec->queue} = 1; my $record; @@ -600,6 +612,7 @@ sub import_record_list_impl { if($U->event_code($record)) { $conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $record}); + $e->rollback; next; } @@ -607,6 +620,7 @@ sub import_record_list_impl { $rec->import_time('now'); unless($e->update_vandelay_queued_authority_record($rec)) { $conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $e->die_event}); + $e->rollback; next; } } -- 2.43.2