Bugzilla – Attachment 159967 Details for
Bug 35479
Nightly cronjob for plugins should log the plugins that are being run
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35479: (follow-up) Match formatting for other cronjob logs
Bug-35479-follow-up-Match-formatting-for-other-cro.patch (text/plain), 2.22 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-12-18 13:12:26 UTC
(
hide
)
Description:
Bug 35479: (follow-up) Match formatting for other cronjob logs
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-12-18 13:12:26 UTC
Size:
2.22 KB
patch
obsolete
>From 2a71c9afbd72db69afa22d3b94a9a2c31ecf666f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 5 Dec 2023 13:40:48 +0000 >Subject: [PATCH] Bug 35479: (follow-up) Match formatting for other cronjob > logs > >To test: >1 - Install the Kitchen Sink plugin >2 - Restart all >3 - Enable 'CronjobLog' system preference >4 - perl misc/cronjobs/plugins_nightly.pl >5 - Note you see on the command line 'Remember to clean the kitchen' - this indicates the plugin cron ran >6 - Tools->log viewer, select 'cronjob' and view >7 - Note you only see 'plugins_nightly.pl' Run and End lines >8 - Apply patches >9 - perl misc/cronjobs/plugins_nightly.pl >10 - View logs agian >11 - Note you now see Run and End lines for 'Koha::Plugin::Com::ByWaterSolutions::KitchenSink' >12 - Confirm they look like the other lines >13 - Edit KitchenSink.pm and add 'die "Kittens";' to the cronjob nightly >14 - perl misc/cronjobs/plugins_nightly.pl >15 - View logs, confirm there is a FAILED error message for the KitchenSink cron > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > misc/cronjobs/plugins_nightly.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/cronjobs/plugins_nightly.pl b/misc/cronjobs/plugins_nightly.pl >index 9816d19bda2..64d3529002a 100755 >--- a/misc/cronjobs/plugins_nightly.pl >+++ b/misc/cronjobs/plugins_nightly.pl >@@ -24,12 +24,12 @@ if ( C4::Context->config("enable_plugins") ) { > foreach my $plugin (@plugins) { > my $plugin_name = ref $plugin; > try { >- cronlogaction({ info => "running nightly cronjob for plugin $plugin_name" }); >+ cronlogaction({ info => "$plugin_name" }); > $plugin->cronjob_nightly(); >- cronlogaction({ info => "finished nightly cronjob for plugin $plugin_name" }); >+ cronlogaction({ action => "End", info => "$plugin_name COMPLETED" }); > } > catch { >- cronlogaction({ info => "failed to running nightly cronjob for plugin $plugin_name with error: $_" }); >+ cronlogaction({ action => "Error", info => "$plugin_name FAILED with error: $_" }); > warn "$_"; > $logger->warn("$_"); > }; >-- >2.43.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 35479
:
159560
|
159581
|
159958
|
159959
|
159960
|
159966
| 159967 |
159968