From: Mike Rylander Date: Thu, 19 Jan 2017 20:54:53 +0000 (-0500) Subject: LP#1657885: Account for new bundling/chunking logic in OpenSRF 2.5+ X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f96c8a5f606fbb899f43a0f4bc28e35af7ee8209;p=working%2FEvergreen.git LP#1657885: Account for new bundling/chunking logic in OpenSRF 2.5+ When chunking was renamed bundling and actually chunking added in OpenSRF 2.5, the few places in Evergreen that tried to make use of the old mechanism directly now break. The most obvious breakage is in the alternate printable hold pull list, which we fix here. Evidence of other broken code should be fixed as needed, though spots to look our for are z39.50 results and Vandelay processing. To test: 1) In Evergreen 2.11 running on top of OpenSRF 2.5+, attempt to use the alt pull list printing interface at a location with many holds on their pull list. The progress bar will spin forever. 2) After applying this patch, do the same. The interface should work quickly. Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 5d08462027..52f0893944 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -1691,7 +1691,7 @@ sub print_hold_pull_list_stream { delete($$params{chunk_size}) unless (int($$params{chunk_size})); delete($$params{chunk_size}) if ($$params{chunk_size} && $$params{chunk_size} > 50); # keep the size reasonable $$params{chunk_size} ||= 10; - $client->max_chunk_size($$params{chunk_size}) if ($client->can('max_chunk_size')); + $client->max_chunk_size($$params{chunk_size}) if (!$client->can('max_bundle_size') && $client->can('max_chunk_size')); $$params{org_id} = (defined $$params{org_id}) ? $$params{org_id}: $e->requestor->ws_ou; return $e->die_event unless $e->allowed('VIEW_HOLD', $$params{org_id }); @@ -2230,7 +2230,7 @@ sub print_expired_holds_stream { delete($$params{chunk_size}) unless (int($$params{chunk_size})); delete($$params{chunk_size}) if ($$params{chunk_size} && $$params{chunk_size} > 50); # keep the size reasonable $$params{chunk_size} ||= 10; - $client->max_chunk_size($$params{chunk_size}); + $client->max_chunk_size($$params{chunk_size}) if (!$client->can('max_bundle_size') && $client->can('max_chunk_size')); $$params{org_id} = (defined $$params{org_id}) ? $$params{org_id}: $e->requestor->ws_ou; @@ -3517,7 +3517,7 @@ sub clear_shelf_cache { return $e->die_event unless $e->checkauth and $e->allowed('VIEW_HOLD'); $chunk_size ||= 25; - $client->max_chunk_size($chunk_size) if ($client->can('max_chunk_size')); + $client->max_chunk_size($chunk_size) if (!$client->can('max_bundle_size') && $client->can('max_chunk_size')); my $hold_data = OpenSRF::Utils::Cache->new('global')->get_cache($cache_key); @@ -3628,7 +3628,7 @@ sub clear_shelf_process { my @holds; my @canceled_holds; # newly canceled holds $chunk_size ||= 25; # chunked status updates - $client->max_chunk_size($chunk_size) if ($client->can('max_chunk_size')); + $client->max_chunk_size($chunk_size) if (!$client->can('max_bundle_size') && $client->can('max_chunk_size')); my $counter = 0; for my $hold_id (@hold_ids) {