A call to open-ils.circ.copy_location.retrieve.all via the gateway can
fail with a large number of shelving locations. The API call succeeds,
but the gateway reports a timeout and returns null. Streaming the
response seems to fix the problem. Thanks to Dan Wells for providing an
example to copy in LP#
1756142.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
__PACKAGE__->register_method(
api_name => "open-ils.circ.copy_location.retrieve.all",
method => 'cl_retrieve_all',
+ stream => 1,
argc => 2,
signature => q/
Retrieves the ranged set of copy locations for the requested org.
$second_cstore_arg->{"flesh_fields"} = {"acpl" => ["owning_lib"]};
}
- return new_editor()->search_asset_copy_location([{
+ my $locations = new_editor()->search_asset_copy_location([{
owning_lib => $U->get_org_full_path($org_id),
deleted => "f"
}, $second_cstore_arg]);
+ $client->respond($_) for @$locations;
+ return undef;
}
__PACKAGE__->register_method(