Bugzilla – Attachment 57052 Details for
Bug 17261
Add memcached configuration info to about.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 17261: Memcached may not longer be running
PASSED-QA-Bug-17261-Memcached-may-not-longer-be-ru.patch (text/plain), 3.26 KB, created by
Katrin Fischer
on 2016-11-01 16:17:16 UTC
(
hide
)
Description:
[PASSED QA] Bug 17261: Memcached may not longer be running
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-11-01 16:17:16 UTC
Size:
3.26 KB
patch
obsolete
>From bdf4d197448a3b44ab4d3dde1f33d7bb82808cef Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Sep 2016 10:04:13 +0100 >Subject: [PATCH] [PASSED QA] Bug 17261: Memcached may not longer be running > >If plack is started with memcached, memcached will be considered as >running, even if it has been stopped (or crashed). >This case should be highlighted on the about page. >Note that I am not sure about the consequences of this specific case! > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > about.pl | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 11 +++++++++-- > 2 files changed, 15 insertions(+), 3 deletions(-) > >diff --git a/about.pl b/about.pl >index c489515..3e1240b 100755 >--- a/about.pl >+++ b/about.pl >@@ -75,12 +75,17 @@ if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { > my $memcached_servers = $ENV{MEMCACHED_SERVERS} || C4::Context->config('memcached_servers'); > my $memcached_namespace = $ENV{MEMCACHED_NAMESPACE} || C4::Context->config('memcached_namespace') // 'koha'; > >-my $effective_caching_method = ref(Koha::Caches->get_instance->cache); >+my $cache = Koha::Caches->get_instance; >+my $effective_caching_method = ref($cache->cache); >+# Memcached may have been running when plack has been initialized but could have been stopped since >+# FIXME What are the consequences of that?? >+my $is_memcached_still_active = $cache->set_in_cache('test_for_about_page', "just a simple value"); > > $template->param( > effective_caching_method => $effective_caching_method, > memcached_servers => $memcached_servers, > memcached_namespace => $memcached_namespace, >+ is_memcached_still_active => $is_memcached_still_active, > memcached_running => Koha::Caches->get_instance->memcached_cache > ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 3ea81d5..2a3174d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -58,8 +58,15 @@ > Namespace: [% IF memcached_namespace %]<span>[% memcached_namespace | html %]</span> > [% ELSE %]<span>undefined</span>[% END %] | > Status: [% IF memcached_servers %] >- [% IF memcached_running %]<span class="status_ok">running</span> >- [% ELSE %]<span class="status_warn">not running</span>[% END %] >+ [% IF memcached_running %] >+ [% IF is_memcached_still_active %] >+ <span class="status_ok">running</span> >+ [% ELSE %] >+ <span class="status_warn">no longer running</span><span>, restart memcached!</span> >+ [% END %] >+ [% ELSE %] >+ <span class="status_warn">not running</span> >+ [% END %] > [% ELSE %] > <span>unknown</span> > [% END %] >-- >2.7.4
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 17261
:
55265
|
55297
|
55309
|
55327
|
55328
|
55535
|
55536
|
55537
|
55538
|
55542
|
57049
|
57050
|
57051
| 57052 |
57053