[Koha-cvs] koha/misc/migration_tools bulkmarcimport.pl
Joshua Ferraro
jmf at kados.org
Sun Feb 26 00:40:59 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch:
Changes by: Joshua Ferraro <kados at savannah.gnu.org> 06/02/25 23:40:59
Modified files:
misc/migration_tools: bulkmarcimport.pl
Log message:
minor bugfix with 'commit' option
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/misc/migration_tools/bulkmarcimport.pl.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: koha/misc/migration_tools/bulkmarcimport.pl
diff -u koha/misc/migration_tools/bulkmarcimport.pl:1.3 koha/misc/migration_tools/bulkmarcimport.pl:1.4
--- koha/misc/migration_tools/bulkmarcimport.pl:1.3 Sat Feb 25 21:53:48 2006
+++ koha/misc/migration_tools/bulkmarcimport.pl Sat Feb 25 23:40:59 2006
@@ -81,7 +81,13 @@
$batch->warnings_off();
$batch->strict_off();
my $i=0;
-$commit = 50 unless ($commit);
+my $commitnum = 50;
+
+if ($commit) {
+
+$commitnum = $commit;
+
+}
#1st of all, find item MARC tag.
my ($tagfield,$tagsubfield) = &MARCfind_marc_from_kohafield($dbh,"items.itemnumber",'');
@@ -93,7 +99,7 @@
if ($i==$number) {
z3950_extended_services($Zconn,'commit',set_service_options('commit'));
- print "COMMIT OPERATION SUCCESSFUL\n" if $verbose;
+ print "COMMIT OPERATION SUCCESSFUL\n";
my $timeneeded = gettimeofday - $starttime;
die "$i MARC records imported in $timeneeded seconds\n";
@@ -101,8 +107,8 @@
# perform the commit operation ever so often
if ($i==$commit) {
z3950_extended_services($Zconn,'commit',set_service_options('commit'));
- $commit*=2;
- print "COMMIT OPERATION SUCCESSFUL\n" if $verbose;
+ $commit+=$commitnum;
+ print "COMMIT OPERATION SUCCESSFUL\n";
}
#now, parse the record, extract the item fields, and store them in somewhere else.
@@ -165,7 +171,7 @@
}
# final commit of the changes
z3950_extended_services($Zconn,'commit',set_service_options('commit'));
-print "COMMIT OPERATION SUCCESSFUL\n" if $verbose;
+print "COMMIT OPERATION SUCCESSFUL\n";
my $timeneeded = gettimeofday - $starttime;
print "$i MARC records done in $timeneeded seconds\n";
More information about the Koha-cvs
mailing list