[open-ils-commits] [GIT] Evergreen ILS branch master updated. 7ec3ea5ef54dd1c3651bc8f4ec2575f2308c4ae3

Evergreen Git git at git.evergreen-ils.org
Mon Apr 27 11:14:24 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  7ec3ea5ef54dd1c3651bc8f4ec2575f2308c4ae3 (commit)
      from  6b0d8e7c2f72431efb3cacaaa9603f0c9dd15cf2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7ec3ea5ef54dd1c3651bc8f4ec2575f2308c4ae3
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Tue Apr 14 10:43:49 2015 -0400

    LP 1444130: Add max_chunk_size guards to Holds.pm.
    
    Web staff client fixes introduced a bug in using the Clear
    Holds Shelf checkin modifier.  Commit 4ccbf980 added calls
    to max_chunk_size on the client to use chunked responses for
    better feedback during long operations.  Thise works just
    fine when a regular OpenSRF AppRequest is used, but leads to
    a network error when AppSubrequest is used, as apparently the
    xul client does with the Clear Holds Shelf checkin modifier.
    
    This commit adds code to check if the client object can do
    the max_chunk_size call when the max_chunk_size call is
    made.  This will prevent the network errors in cases where
    the client is an AppSubrequest object and will still use
    chunked responses when the client is capable of doing it.
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

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 144098e..a859f11 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -1687,7 +1687,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});
+    $client->max_chunk_size($$params{chunk_size}) if ($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 });
@@ -3516,7 +3516,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);
+    $client->max_chunk_size($chunk_size) if ($client->can('max_chunk_size'));
 
     my $hold_data = OpenSRF::Utils::Cache->new('global')->get_cache($cache_key);
 
@@ -3627,7 +3627,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);
+    $client->max_chunk_size($chunk_size) if ($client->can('max_chunk_size'));
 
     my $counter = 0;
     for my $hold_id (@hold_ids) {

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list