From 1ac38782a109816410dd1992d2be7102371bfe8c Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 11 Oct 2007 14:52:56 -0500 Subject: [PATCH] #1474 : Bulkmarcimport croaks when Log is ON set to 0 and restore at the end of the import Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- misc/migration_tools/bulkmarcimport.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 85e6b25a32..b13dde8158 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -180,6 +180,11 @@ exit; my $dbh = C4::Context->dbh; +# save the CataloguingLog property : we don't want to log a bulkmarcimport. It will slow the import & +# will create problems in the action_logs table, that can't handle more than 1 entry per second per user. +my $CataloguingLog = C4::Context->preference('CataloguingLog'); +$dbh->do("UPDATE systempreferences SET value=0 WHERE variable='CataloguingLog'"); + if ($delete) { print "deleting biblios\n"; $dbh->do("truncate biblio"); @@ -305,5 +310,8 @@ if ($fk_off) { #z3950_extended_services('commit',set_service_options('commit')); #print "COMMIT OPERATION SUCCESSFUL\n"; +# restore CataloguingLog +$dbh->do("UPDATE systempreferences SET value=$CataloguingLog WHERE variable='CataloguingLog'"); + my $timeneeded = gettimeofday - $starttime; print "$i MARC records done in $timeneeded seconds\n"; -- 2.39.5