Bugzilla – Attachment 159560 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: Log start, end, and any failures for each plugin's nightly cronjob
Bug-35479-Log-start-end-and-any-failures-for-each-.patch (text/plain), 1.72 KB, created by
Kyle M Hall (khall)
on 2023-12-04 17:50:17 UTC
(
hide
)
Description:
Bug 35479: Log start, end, and any failures for each plugin's nightly cronjob
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-12-04 17:50:17 UTC
Size:
1.72 KB
patch
obsolete
>From ef06130c0c25f666dc559efc13544966349e8ecb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 4 Dec 2023 12:41:32 -0500 >Subject: [PATCH] Bug 35479: Log start, end, and any failures for each plugin's > nightly cronjob > >When running the plugins_nightly.pl cronjob, we should record the plugins that have a nightly method, logging the start and end of each plugins routine > >Test Plan: >1) Enable CronjobLog >2) Install a plugin with a nightly cronjob ( e.g. > https://github.com/bywatersolutions/koha-plugin-book-list-printer ) >3) Run plugins_nightly.pl >4) Note new entries in the cronjob viewer for the start and end of the > plugin's nightly cronjob run >5) Edit the plugin, add a line like "die 'this is a test';" to the > plugin's nightly cronjob >6) Run plugins_nightly.pl >7) View the action logs, not the log for the error you added! >--- > misc/cronjobs/plugins_nightly.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/misc/cronjobs/plugins_nightly.pl b/misc/cronjobs/plugins_nightly.pl >index 218ed13fc04..9816d19bda2 100755 >--- a/misc/cronjobs/plugins_nightly.pl >+++ b/misc/cronjobs/plugins_nightly.pl >@@ -22,10 +22,14 @@ 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" }); > $plugin->cronjob_nightly(); >+ cronlogaction({ info => "finished nightly cronjob for plugin $plugin_name" }); > } > catch { >+ cronlogaction({ info => "failed to running nightly cronjob for plugin $plugin_name with error: $_" }); > warn "$_"; > $logger->warn("$_"); > }; >-- >2.30.2
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