Bugzilla – Attachment 141312 Details for
Bug 31203
Cronjobs should log completion as well as logging begin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31203: POC advance_notices
Bug-31203-POC-advancenotices.patch (text/plain), 1.67 KB, created by
Marcel de Rooy
on 2022-10-04 15:01:23 UTC
(
hide
)
Description:
Bug 31203: POC advance_notices
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-10-04 15:01:23 UTC
Size:
1.67 KB
patch
obsolete
>From ebdc9af2ab2b6e24cdb049b587588b73c41732c0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 21 Jul 2022 12:44:40 +0000 >Subject: [PATCH] Bug 31203: POC advance_notices >Content-Type: text/plain; charset=utf-8 > >This patch proposes a new standard for cronlogaction > >We copy @ARGV into a space separated string, then pass this to >cronlogaction > >At the end of the script we add a call with info "COMPLETED" > >To test: >1 - Apply patch >2 - perl misc/cronjobs/advance_notices.pl -v -m 4 -n -c >3 - sudo koha-mysql kohadev >4 - SELECT * FROM action_logs WHERE interface="CRON"; >5 - Note start and completion logged >6 - Note command line arguments included in info > >If this looks good I will copy this pattern to the other cronjobs > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/cronjobs/advance_notices.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index 725fc13482..d27513017d 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -185,6 +185,8 @@ my $itemscontent = join(',',qw( date_due title author barcode )); > my $help = 0; > my $man = 0; > >+my $command_line_options = join(" ",@ARGV); >+ > GetOptions( > 'help|?' => \$help, > 'man' => \$man, >@@ -215,7 +217,7 @@ END_WARN > unless ($confirm) { > pod2usage(1); > } >-cronlogaction(); >+cronlogaction({ info => $command_line_options }); > > my %branches = (); > if (@branchcodes) { >@@ -638,6 +640,7 @@ sub send_digests { > } > } > >+cronlogaction({ info => "COMPLETED" }); > > 1; > >-- >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 31203
:
137960
|
137961
|
137962
|
137963
|
137983
|
138695
|
140743
|
140744
|
140745
|
140746
|
140980
|
140981
|
140982
|
140983
|
141128
|
141311
| 141312 |
141313
|
141314
|
141315