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});
$$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 });
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});
$$params{org_id} = (defined $$params{org_id}) ? $$params{org_id}: $e->requestor->ws_ou;
return $e->die_event unless $e->checkauth and $e->allowed('VIEW_HOLD');
$chunk_size ||= 25;
+ $client->max_chunk_size($chunk_size);
+
my $hold_data = OpenSRF::Utils::Cache->new('global')->get_cache($cache_key);
if (!$hold_data) {
);
sub clear_shelf_process {
- my($self, $client, $auth, $org_id, $match_copy) = @_;
+ my($self, $client, $auth, $org_id, $match_copy, $chunk_size) = @_;
my $e = new_editor(authtoken=>$auth);
$e->checkauth or return $e->die_event;
my @holds;
my @canceled_holds; # newly canceled holds
- my $chunk_size = 25; # chunked status updates
+ $chunk_size ||= 25; # chunked status updates
+ $client->max_chunk_size($chunk_size);
+
my $counter = 0;
for my $hold_id (@hold_ids) {
// see if we have the requested range cached
if (holds[offset]) {
- return provider.arrayNotifier(patronSvc.holds, offset, count);
+ return provider.arrayNotifier(holds, offset, count);
}
// see if we have the holds IDs for this range already loaded
egCore.net.request(
'open-ils.circ',
'open-ils.circ.hold.clear_shelf.process',
- egCore.auth.token(), $scope.pickup_ou.id()
+ egCore.auth.token(), $scope.pickup_ou.id(),
+ null, 1
// request responses from the clear shelf cache
).then(
egCore.net.request(
'open-ils.circ',
'open-ils.circ.hold.clear_shelf.get_cache',
- egCore.auth.token(), resp.cache_key
+ egCore.auth.token(), resp.cache_key, 1
).then(null, null, handle_clear_cache_resp);
},