From: Kyle Huckins Date: Tue, 3 Jan 2017 23:20:08 +0000 (-0800) Subject: CAT-103 Clean up pauseComp() X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bc9f046a091ca4fd8e984c26e806404af2e22a68;p=working%2FEvergreen.git CAT-103 Clean up pauseComp() Remove instances of pauseComp() in copy_browser.js and cat/util.js in favor of .authoritative calls. Make open-ils.search.asset.copy.batch.retrieve authoritative. Signed-off-by: Kyle Huckins --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index edb1a8af1d..e08b505c2f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -379,7 +379,7 @@ sub biblio_id_to_copy { my( $self, $client, $ids ) = @_; my $e = new_editor(); $logger->info("Fetching copies @$ids"); - return $e->search_asset_copy({ id => $ids }); + return $e->search_asset_copy({id => $ids}); } diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 9cf3260536..02b5fbb151 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -211,9 +211,7 @@ cat.util.transfer_copies = function(params) { alert($("catStrings").getString('staff.cat.util.transfer_copies.successful_transfer')); } - cat.util.pauseComp(1000); - - return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE', [ params.copy_ids ]); + return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE.authoritative', [ params.copy_ids ]); } catch(E) { error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.util.transfer_copies.transfer_error'),E); @@ -523,10 +521,8 @@ cat.util.mark_item_damaged = function(copy_ids) { $("catStrings").getFormattedString('staff.cat.util.mark_item_damaged.multiple_item_damaged', [count])); } } - - cat.util.pauseComp(1000); - return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE', [ copy_ids ]); + return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE.authoritative', [ copy_ids ]); } catch(E) { if (error) error.standard_unexpected_error_alert('cat.util.mark_item_damaged',E); else alert('FIXME: ' + E); @@ -583,9 +579,7 @@ cat.util.mark_item_missing = function(copy_ids) { } } - cat.util.pauseComp(1000); - - return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE', [ copy_ids ]); + return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE.authoritative', [ copy_ids ]); } catch(E) { if (error) error.standard_unexpected_error_alert('cat.util.mark_item_missing',E); else alert('FIXME: ' + E); @@ -957,9 +951,7 @@ cat.util.mark_item_as_missing_pieces = function(copy_ids) { } } - cat.util.pauseComp(1000); - - return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE', [ copy_ids ]); + return network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE.authoritative', [ copy_ids ]); } catch(E) { alert('Error in cat.util.mark_item_as_missing_pieces: ' + E); return false; @@ -1196,9 +1188,7 @@ cat.util.update_copies_by_id = function(copy_ids) { } } - cat.util.pauseComp(1000); - - var copies = network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE', [ copy_ids ]); + var copies = network.simple_request('FM_ACP_UNFLESHED_BATCH_RETRIEVE.authoritative', [ copy_ids ]); if (typeof copies.ilsevent != 'undefined') throw(copies); return copies; @@ -1263,7 +1253,7 @@ cat.util.request_copies_by_volumes = function(vol_ids){ JSAN.use('util.network'); var network = new util.network(); - return network.simple_request('FM_ACP_BATCH_RETRIEVE_VIA_ACN_LIST', vol_ids); + return network.simple_request('FM_ACP_BATCH_RETRIEVE_VIA_ACN_LIST.authoritative', vol_ids); } catch(E) { alert('Error in cat.util.request_items: ' + E); return null; @@ -1389,12 +1379,4 @@ cat.util.get_cbs_for_bre_id = function(doc_id) { } } -cat.util.pauseComp = function(ms) { - var curr = new Date().getTime(); - ms += curr; - while (curr < ms){ - curr = new Date().getTime(); - } -} - dump('exiting cat/util.js\n');