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

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 12 14:03:27 EST 2010


Author: miker
Date: 2010-03-12 14:03:23 -0500 (Fri, 12 Mar 2010)
New Revision: 15831

Modified:
   branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
Backport r15830: scale the response rate with the number of records processed so far

Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-03-12 19:02:18 UTC (rev 15830)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-03-12 19:03:23 UTC (rev 15831)
@@ -238,6 +238,7 @@
 	my $batch = new MARC::Batch ($marctype, $filename);
 	$batch->strict_off;
 
+	my $response_scale = 10;
 	my $count = 0;
 	my $r = -1;
 	while (try { $r = $batch->next } otherwise { $r = -1 }) {
@@ -261,7 +262,8 @@
 			} else {
 				_add_auth_rec( $e, $xml, $queue_id, $purpose ) or return $e->die_event;
 			}
-			$client->respond($count) if (++$count % 10) == 0;
+			$client->respond($count) if (++$count % $response_scale) == 0;
+			$response_scale *= 10 if ($count == ($response_scale * 10));
 		} catch Error with {
 			my $error = shift;
 			$logger->warn("Encountered a bad record at Vandelay ingest: ".$error);



More information about the open-ils-commits mailing list