From 6f61b0e5ca705110818a8720fe61814abcbb2ca8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 13 Feb 2013 14:07:29 -0500 Subject: [PATCH] Z3950 Batch : search ou settings Signed-off-by: Bill Erickson --- .../lib/OpenILS/Application/Search/Z3950.pm | 9 +++-- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 41 ++++++++++++++++++++++ .../XXXX.schema.z39-batch-fetch-overlay.sql | 41 ++++++++++++++++++++++ 3 files changed, 89 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm index f1e6e72cc0..bf8c31bb3e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm @@ -638,8 +638,13 @@ sub stamp_and_queue_results { sub send_and_queue_bucket_searches { my ($conn, $e, $queue, $z_searches) = @_; - my $max_parallel = 5; # TODO org setting - my $search_limit = 5; # TODO org setting + my $max_parallel = $U->ou_ancestor_setting( + $e->requestor->ws_ou, + 'cat.z3950.batch.max_parallel') || 5; + + my $search_limit = $U->ou_ancestor_setting( + $e->requestor->ws_ou, + 'cat.z3950.batch.max_results') || 5; my $response = { bre_count => 0, diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 88051810eb..e34d7b43f4 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -12004,3 +12004,44 @@ INSERT INTO config.org_unit_setting_type ), 'integer' ); + +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype) + VALUES ( + 'cat.z3950.batch.max_parallel', + 'cat', + oils_i18n_gettext( + 'cat.z3950.batch.max_parallel', + 'Maximum Parallel Z39.50 Batch Searches', + 'coust', + 'label' + ), + oils_i18n_gettext( + 'cat.z3950.batch.max_parallel', + 'The maximum number of Z39.50 searches that can be in-flight at any given time when performing batch Z39.50 searches', + 'coust', + 'description' + ), + 'integer' + ); + +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype) + VALUES ( + 'cat.z3950.batch.max_results', + 'cat', + oils_i18n_gettext( + 'cat.z3950.batch.max_results', + 'Maximum Z39.50 Batch Search Results', + 'coust', + 'label' + ), + oils_i18n_gettext( + 'cat.z3950.batch.max_results', + 'The maximum number of search results to retrieve and queue for each record + Z39 source during batch Z39.50 searches', + 'coust', + 'description' + ), + 'integer' + ); + diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql index 8edf2986b3..57a9050a1c 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql @@ -49,4 +49,45 @@ INSERT INTO config.z3950_index_field_map -- let's leave room for more stock mappings SELECT SETVAL('config.z3950_index_field_map_id_seq'::TEXT, 1000); +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype) + VALUES ( + 'cat.z3950.batch.max_parallel', + 'cat', + oils_i18n_gettext( + 'cat.z3950.batch.max_parallel', + 'Maximum Parallel Z39.50 Batch Searches', + 'coust', + 'label' + ), + oils_i18n_gettext( + 'cat.z3950.batch.max_parallel', + 'The maximum number of Z39.50 searches that can be in-flight at any given time when performing batch Z39.50 searches', + 'coust', + 'description' + ), + 'integer' + ); + +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype) + VALUES ( + 'cat.z3950.batch.max_results', + 'cat', + oils_i18n_gettext( + 'cat.z3950.batch.max_results', + 'Maximum Z39.50 Batch Search Results', + 'coust', + 'label' + ), + oils_i18n_gettext( + 'cat.z3950.batch.max_results', + 'The maximum number of search results to retrieve and queue for each record + Z39 source during batch Z39.50 searches', + 'coust', + 'description' + ), + 'integer' + ); + + COMMIT; -- 2.11.0