Bugzilla – Attachment 96467 Details for
Bug 24272
Add a command line script to compare the syspref cache to the database
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24272: add check_sysprefs_cache.pl
Bug-24272-add-checksysprefscachepl.patch (text/plain), 1.98 KB, created by
Nick Clemens (kidclamp)
on 2019-12-19 03:20:58 UTC
(
hide
)
Description:
Bug 24272: add check_sysprefs_cache.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-12-19 03:20:58 UTC
Size:
1.98 KB
patch
obsolete
>From 4b1fe938781650ef7950d54ba65f26cb5844aa58 Mon Sep 17 00:00:00 2001 >From: Nick <nick@bywatersolutions.com> >Date: Thu, 19 Dec 2019 03:20:36 +0000 >Subject: [PATCH] Bug 24272: add check_sysprefs_cache.pl > >--- > misc/maintenance/check_syspref_cache.pl | 49 +++++++++++++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 misc/maintenance/check_syspref_cache.pl > >diff --git a/misc/maintenance/check_syspref_cache.pl b/misc/maintenance/check_syspref_cache.pl >new file mode 100644 >index 0000000000..8602c7c3d5 >--- /dev/null >+++ b/misc/maintenance/check_syspref_cache.pl >@@ -0,0 +1,49 @@ >+#! /usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use Koha::Script; >+use Koha::Caches; >+use Koha::Config::SysPrefs; >+use C4::Context; >+ >+=head1 NAME >+ >+check_syspref_cache.pl >+ >+=head1 SYNOPSIS >+ >+ perl check_syspref_cache.pl >+ >+=head1 DESCRIPTION >+ >+Catch data inconsistencies in cached sysprefs vs those in the database >+ >+=cut >+ >+ >+my $syspref_cache = Koha::Caches->get_instance('syspref') unless $syspref_cache; >+my $prefs = Koha::Config::SysPrefs->search(); >+while (my $pref = $prefs->next) { >+ my $var = lc $pref->variable; >+ my $cached_var = $syspref_cache->get_from_cache("syspref_$var"); >+ next unless $cached_var; >+ print "$var: value in cache is $cached_var and value in db is ".$pref->value,"\n" unless $cached_var eq $pref->value; >+} >+ >+ >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24272
:
96467
|
113135
|
113193
|
115029
|
115192
|
115412
|
115413