From d21296dd5473ab6d96e8c680edea285633d243d9 Mon Sep 17 00:00:00 2001 From: Mason James Date: Thu, 25 May 2017 05:32:52 +1200 Subject: [PATCH] Revert "Bug 16758 - Caching issues in scripts running in daemon mode" This reverts commit f178fd076b90c53f7b45c8f1abbb9df6de5e1122. --- misc/migration_tools/rebuild_zebra.pl | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index fe84270b2a..b32f8ba6ad 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -26,7 +26,6 @@ use C4::Biblio; use C4::AuthoritiesMarc; use C4::Items; use Koha::RecordProcessor; -use Koha::Caches; use XML::LibXML; use constant LOCK_FILENAME => 'rebuild..LCK'; @@ -64,7 +63,6 @@ my $run_user = (getpwuid($<))[0]; my $wait_for_lock = 0; my $use_flock; my $table = 'biblioitems'; -my $is_memcached = Koha::Caches->get_instance('syspref')->memcached_cache; my $verbose_logging = 0; my $zebraidx_log_opt = " -v none,fatal,warn "; @@ -138,9 +136,6 @@ if ($daemon_mode) { $msg .= "Please do '$0 --help' to see usage.\n"; die $msg; } - unless ($is_memcached) { - warn "Warning: script running in daemon mode, without recommended caching system (memcached).\n"; - } $authorities = 1; $biblios = 1; $process_zebraqueue = 1; @@ -250,10 +245,7 @@ if ($daemon_mode) { if (_flock($LockFH, LOCK_EX|LOCK_NB)) { eval { $dbh = C4::Context->dbh; - if( zebraqueue_not_empty() ) { - Koha::Caches->flush_L1_caches() if $is_memcached; - do_one_pass(); - } + do_one_pass() if ( zebraqueue_not_empty() ); }; if ($@ && $verbose_logging) { warn "Warning : $@\n"; -- 2.39.5