[open-ils-commits] r20356 - trunk/Open-ILS/src/support-scripts (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 1 08:11:28 EDT 2011
Author: dbs
Date: 2011-05-01 08:11:27 -0400 (Sun, 01 May 2011)
New Revision: 20356
Modified:
trunk/Open-ILS/src/support-scripts/authority_control_fields.pl
Log:
Slight optimization for authority_control_fields.pl
Instead of creating two CStoreEditors per bib record, reuse the global
CStoreEditor for read operations; this way we only have to create a new
CStoreEditor if a record has fields to authorize.
Signed-off-by: Dan Scott <dan at coffeecode.net>
Modified: trunk/Open-ILS/src/support-scripts/authority_control_fields.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/authority_control_fields.pl 2011-05-01 00:29:51 UTC (rev 20355)
+++ trunk/Open-ILS/src/support-scripts/authority_control_fields.pl 2011-05-01 12:11:27 UTC (rev 20356)
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# Copyright (C) 2010 Laurentian University
+# Copyright (C) 2010-2011 Laurentian University
# Author: Dan Scott <dscott at laurentian.ca>
#
# This program is free software; you can redistribute it and/or
@@ -54,12 +54,12 @@
use OpenILS::Utils::CStoreEditor;
OpenILS::Utils::CStoreEditor::init();
-my $editor = OpenILS::Utils::CStoreEditor->new;
+my $e = OpenILS::Utils::CStoreEditor->new;
my $undeleted;
if ($options{all}) {
# get a list of all non-deleted records from Evergreen
# open-ils.cstore open-ils.cstore.direct.biblio.record_entry.id_list.atomic {"deleted":"f"}
- $undeleted = $editor->request(
+ $undeleted = $e->request(
'open-ils.cstore.direct.biblio.record_entry.id_list.atomic',
[{deleted => 'f'}, {id => { '>' => 0}}]
);
@@ -340,7 +340,6 @@
foreach my $rec_id (@records) {
# print "$rec_id\n";
- my $e = OpenILS::Utils::CStoreEditor->new();
# State variable; was the record changed?
my $changed;
More information about the open-ils-commits
mailing list