[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 87cb606448ffccab02f89e383c22cc2b36da69e0
Evergreen Git
git at git.evergreen-ils.org
Sun Feb 18 10:56:08 EST 2018
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, rel_3_0 has been updated
via 87cb606448ffccab02f89e383c22cc2b36da69e0 (commit)
via e8c27cb28cad4ac2fb5e9dd8c535a42bcb30fab1 (commit)
from 322d25812b91a03a8466df49198766fdc9e1e6fd (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 87cb606448ffccab02f89e383c22cc2b36da69e0
Author: Bill Erickson <berickxx at gmail.com>
Date: Fri Jan 26 16:42:08 2018 -0500
LP#1745499 De-Parallelify Item Status file upload
Fetch copies in a series instead of in parallel when loading copy
barcodes from a file in the Item Status interface. This helps avoid
excessive pcrud process count.
Since this causes the action to take a little longer, the commit also
includes a progress dialog indicating copy retrieve progress.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
index 3624b2a..58cc454 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
@@ -234,8 +234,13 @@ function($scope , $location , $timeout , egCore , egGridDataProvider , itemSvc)
* List view - grid stuff
*/
.controller('ListCtrl',
- ['$scope','$q','$routeParams','$location','$timeout','$window','egCore','egGridDataProvider','egItem','egUser','$uibModal','egCirc','egConfirmDialog',
-function($scope , $q , $routeParams , $location , $timeout , $window , egCore , egGridDataProvider , itemSvc , egUser , $uibModal , egCirc , egConfirmDialog) {
+ ['$scope','$q','$routeParams','$location','$timeout','$window','egCore',
+ 'egGridDataProvider','egItem','egUser','$uibModal','egCirc','egConfirmDialog',
+ 'egProgressDialog',
+function($scope , $q , $routeParams , $location , $timeout , $window , egCore ,
+ egGridDataProvider , itemSvc , egUser , $uibModal , egCirc , egConfirmDialog,
+ egProgressDialog) {
+
var copyId = [];
var cp_list = $routeParams.idList;
if (cp_list) {
@@ -282,18 +287,24 @@ function($scope , $q , $routeParams , $location , $timeout , $window , egCore ,
barcodes.push(line);
});
- if (barcodes.length > 0) {
- var promises = [];
- angular.forEach(barcodes, function (b) {
- promises.push(itemSvc.fetch(b));
- });
-
- $q.all(promises).then(
- function() {
- copyGrid.refresh();
- copyGrid.selectItems([itemSvc.copies[0].index]);
- }
- );
+ // Serialize copy retrieval since there may be many, many copies.
+ function fetch_next_copy() {
+ var barcode = barcodes.pop();
+ egProgressDialog.increment();
+
+ if (!barcode) { // All done here.
+ egProgressDialog.close();
+ copyGrid.refresh();
+ copyGrid.selectItems([itemSvc.copies[0].index]);
+ return;
+ }
+
+ itemSvc.fetch(barcode).then(fetch_next_copy);
+ }
+
+ if (barcodes.length) {
+ egProgressDialog.open({value: 0, max: barcodes.length});
+ fetch_next_copy();
}
}
});
commit e8c27cb28cad4ac2fb5e9dd8c535a42bcb30fab1
Author: Bill Erickson <berickxx at gmail.com>
Date: Thu Jan 25 17:57:32 2018 -0500
LP#1745499 Patron bucket from file query consolidation
Replace one-pcrud-call-per-barcode with a single (streaming) pcrud
search call to fetch patron cards when using the barcode file upload
option in the web staff pending patron bucket UI. This avoids spawning
high number of pcrud processes.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
index 0e8545c..92fbc57 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bucket/app.js
@@ -216,24 +216,28 @@ function($scope, $routeParams, bucketSvc , egGridDataProvider, egCore , ngTo
$scope.$watch('barcodesFromFile', function(newVal, oldVal) {
if (newVal && newVal != oldVal) {
- var promises = [];
+ var barcodes = [];
// $scope.resetPendingList(); // ??? Add instead of replace
angular.forEach(newVal.split(/\n/), function(line) {
if (!line) return;
// scrub any trailing spaces or commas from the barcode
line = line.replace(/(.*?)($|\s.*|,.*)/,'$1');
- promises.push(egCore.pcrud.search(
- 'ac',
- {barcode : line},
- {}
- ).then(null, null, function(card) {
- bucketSvc.pendingList.push(card.usr());
- }));
- });
+ barcodes.push(line);
- $q.all(promises).then(function () {
- $scope.gridControls.setQuery({id : bucketSvc.pendingList});
});
+ egCore.pcrud.search(
+ 'ac',
+ {barcode : barcodes},
+ {}
+ ).then(
+ function() {
+ $scope.gridControls.setQuery({id : bucketSvc.pendingList});
+ },
+ null,
+ function(card) {
+ bucketSvc.pendingList.push(card.usr());
+ }
+ );
}
});
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/staff/cat/item/app.js | 39 +++++++++++++-------
.../js/ui/default/staff/circ/patron/bucket/app.js | 26 ++++++++------
2 files changed, 40 insertions(+), 25 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list