Bugzilla – Attachment 174260 Details for
Bug 29238
Cataloging cron jobs are not logged
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29238 - Cataloging cron jobs are not logged
Bug-29238---Cataloging-cron-jobs-are-not-logged.patch (text/plain), 2.73 KB, created by
Eric Phetteplace
on 2024-11-07 21:27:33 UTC
(
hide
)
Description:
Bug 29238 - Cataloging cron jobs are not logged
Filename:
MIME Type:
Creator:
Eric Phetteplace
Created:
2024-11-07 21:27:33 UTC
Size:
2.73 KB
patch
obsolete
>From 528c99b71b1740f21de3fd72c07bc6e2d3f43c11 Mon Sep 17 00:00:00 2001 >From: phette23 <phette23@gmail.com> >Date: Mon, 30 Sep 2024 14:38:27 -0700 >Subject: [PATCH] Bug 29238 - Cataloging cron jobs are not logged > >Testing plan: > >1. set CronjobLog to "Log" >2. Run the three cron jobs > `perl misc/link_bibs_to_authorities.pl; perl misc/cronjobs/merge_authorities.pl -b; perl misc/migration_tools/remove_unused_authorities.pl --confirm` >3. Visit the log viewer /cgi-bin/koha/tools/viewlog.pl, select the "Cron jobs" module, & note it's empty >4. apply the patch >5. Repeat steps 2 & 3 but note the cron logs aren't empty >--- > misc/cronjobs/merge_authorities.pl | 2 ++ > misc/link_bibs_to_authorities.pl | 3 +++ > misc/migration_tools/remove_unused_authorities.pl | 4 ++++ > 3 files changed, 9 insertions(+) > >diff --git a/misc/cronjobs/merge_authorities.pl b/misc/cronjobs/merge_authorities.pl >index 51cd4ef2b2..498386a592 100755 >--- a/misc/cronjobs/merge_authorities.pl >+++ b/misc/cronjobs/merge_authorities.pl >@@ -7,6 +7,7 @@ use Time::HiRes qw( gettimeofday ); > > use Koha::Script -cron; > use C4::AuthoritiesMarc qw( GetAuthority merge ); >+use C4::Log qw( cronlogaction ); > use Koha::Authority::MergeRequests; > > use constant RESET_HOURS => 24; >@@ -21,6 +22,7 @@ GetOptions( > > $|=1; # flushes output > if ( $params->{batch} ) { >+ cronlogaction(); > handle_batch($params); > } else { > pod2usage(1); >diff --git a/misc/link_bibs_to_authorities.pl b/misc/link_bibs_to_authorities.pl >index 0315518168..cc30284ce4 100755 >--- a/misc/link_bibs_to_authorities.pl >+++ b/misc/link_bibs_to_authorities.pl >@@ -24,6 +24,7 @@ use C4::Biblio qw( > LinkBibHeadingsToAuthorities > ModBiblio > ); >+use C4::Log qw( cronlogaction ); > use Koha::Biblios; > use Getopt::Long qw( GetOptions ); > use Pod::Usage qw( pod2usage ); >@@ -70,6 +71,8 @@ if ( not $result or $want_help ) { > usage(); > } > >+cronlogaction(); >+ > my $linker_module = > "C4::Linker::" . ( C4::Context->preference("LinkerModule") || 'Default' ); > unless ( can_load( modules => { $linker_module => undef } ) ) { >diff --git a/misc/migration_tools/remove_unused_authorities.pl b/misc/migration_tools/remove_unused_authorities.pl >index 0065a16e9f..eaf7fef993 100755 >--- a/misc/migration_tools/remove_unused_authorities.pl >+++ b/misc/migration_tools/remove_unused_authorities.pl >@@ -25,6 +25,7 @@ use Modern::Perl; > use Koha::Script; > use C4::Context; > use C4::AuthoritiesMarc qw( DelAuthority ); >+use C4::Log qw( cronlogaction ); > use Getopt::Long qw( GetOptions ); > > use Koha::SearchEngine::Search; >@@ -42,6 +43,9 @@ if ( $want_help || !($test || $confirm) ) { > print_usage(); > exit 0; > } >+ >+cronlogaction(); >+ > if ($test) { > print "*** Testing only, authorities will not be deleted. ***\n"; > } >-- >2.47.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 29238
:
126242
|
126243
|
172240
|
174260
|
174261
|
174545
|
174951
|
174953
|
175040