Backport r15830: scale the response rate with the number of records processed so far
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 12 Mar 2010 19:03:43 +0000 (19:03 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 12 Mar 2010 19:03:43 +0000 (19:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@15832 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm

index 640d059..ed81948 100644 (file)
@@ -238,6 +238,7 @@ sub process_spool {
        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 @@ sub process_spool {
                        } 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);