[open-ils-commits] r10811 -
trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Oct 9 18:17:05 EDT 2008
Author: erickson
Date: 2008-10-09 18:17:00 -0400 (Thu, 09 Oct 2008)
New Revision: 10811
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
make sure we rollback the aborted transactions so they are not sticking around.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2008-10-09 18:59:18 UTC (rev 10810)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2008-10-09 22:17:00 UTC (rev 10811)
@@ -547,10 +547,15 @@
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;
}
- next if $rec->import_time;
+ if($rec->import_time) {
+ $e->rollback;
+ next;
+ }
+
$queues{$rec->queue} = 1;
my $record;
@@ -566,6 +571,7 @@
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 @@
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 @@
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;
}
- next if $rec->import_time;
+ if($rec->import_time) {
+ $e->rollback;
+ next;
+ }
+
$queues{$rec->queue} = 1;
my $record;
@@ -600,6 +612,7 @@
if($U->event_code($record)) {
$conn->respond({total => $total, progress => ++$count, imported => $rec_id, err_event => $record});
+ $e->rollback;
next;
}
@@ -607,6 +620,7 @@
$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;
}
}
More information about the open-ils-commits
mailing list