[open-ils-commits] r18297 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Oct 12 20:26:00 EDT 2010
Author: miker
Date: 2010-10-12 20:25:59 -0400 (Tue, 12 Oct 2010)
New Revision: 18297
Modified:
branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
force reingest via open-ils.ingest
Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2010-10-13 00:04:12 UTC (rev 18296)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2010-10-13 00:25:59 UTC (rev 18297)
@@ -194,6 +194,7 @@
$records = [$records] if (!ref($records));
+ my @good;
for my $rid ( @$records ) {
my $rec = $e->retrieve_biblio_record_entry($rid);
next unless $rec;
@@ -208,9 +209,15 @@
)->[0]->{'vandelay.template_overlay_bib_record'};
$conn->respond({ record => $rid, success => $success });
+ push(@good, $rid) if ($success eq 't');
}
$e->commit;
+ $conn->respond_complete;
+
+ my $ses = OpenSRF::AppSession->create('open-ils.ingest');
+ $ses->request('open-ils.ingest.full.biblio.record', $_)->gather(1) for (@good);
+
return undef;
}
@@ -257,7 +264,6 @@
return undef;
}
$items = [grep { $_->target_biblio_record_entry > 0 } @$items];
-
$template = $e->retrieve_biblio_record_entry( $titem->target_biblio_record_entry )->marc;
}
@@ -268,6 +274,7 @@
$actor->request('open-ils.actor.anon_cache.set_value', $auth, res_list => $responses)->gather(1)
) if ($actor);
+ my @good;
for my $item ( @$items ) {
my $rec = $e->retrieve_biblio_record_entry($item->target_biblio_record_entry);
next unless $rec;
@@ -289,6 +296,7 @@
}
if ($success eq 't') {
+ push(@good, $rid) if ($success eq 't');
unless ($e->delete_container_biblio_record_entry_bucket_item($item)) {
$e->rollback;
if ($actor) {
@@ -311,8 +319,10 @@
push @$responses, { complete => 1, success => 't' };
$actor->request('open-ils.actor.anon_cache.set_value', $auth, res_list => $responses);
} else {
- return { complete => 1, success => 't' };
+ $conn->respond_complete( { complete => 1, success => 't' } );
}
+ my $ses = OpenSRF::AppSession->create('open-ils.ingest');
+ $ses->request('open-ils.ingest.full.biblio.record', $_)->gather(1) for (@good);
} else {
if ($actor) {
push @$responses, { complete => 1, success => 'f' };
More information about the open-ils-commits
mailing list