Bugzilla – Attachment 146831 Details for
Bug 32594
Add a dedicated ES indexing background worker
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32594: (follow-up) Adjust logging per bug 32612
Bug-32594-follow-up-Adjust-logging-per-bug-32612.patch (text/plain), 2.40 KB, created by
Nick Clemens (kidclamp)
on 2023-02-17 11:52:27 UTC
(
hide
)
Description:
Bug 32594: (follow-up) Adjust logging per bug 32612
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-02-17 11:52:27 UTC
Size:
2.40 KB
patch
obsolete
>From c5b25b92171acd028efca557f410fe9f6579d9e3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 17 Feb 2023 11:51:16 +0000 >Subject: [PATCH] Bug 32594: (follow-up) Adjust logging per bug 32612 > >--- > misc/workers/es_indexer_daemon.pl | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > >diff --git a/misc/workers/es_indexer_daemon.pl b/misc/workers/es_indexer_daemon.pl >index 512beb39de..717e003bc6 100755 >--- a/misc/workers/es_indexer_daemon.pl >+++ b/misc/workers/es_indexer_daemon.pl >@@ -75,8 +75,7 @@ $batch_size //= 10; > > die "Not using Elasticsearch" unless C4::Context->preference('SearchEngine') eq 'Elasticsearch'; > >-my $logger = Koha::Logger->get; >-$logger->debug_to_screen; >+my $logger = Koha::Logger->get({ interface => 'worker' }); > > my $conn; > try { >@@ -113,7 +112,7 @@ while (1) { > my $body = $frame->body; > decode_json($body); # TODO Should this be from_json? Check utf8 flag. > } catch { >- $logger->debug(sprintf "Frame not processed - %s", $_); >+ $logger->warn(sprintf "Frame not processed - %s", $_); > return; > } finally { > $conn->ack( { frame => $frame } ); >@@ -126,7 +125,7 @@ while (1) { > my $job = Koha::BackgroundJobs->find($args->{job_id}); > > unless ( $job ) { >- $logger->debug(sprintf "No job found for id=%s", $args->{job_id}); >+ $logger->warn(sprintf "No job found for id=%s", $args->{job_id}); > next; > } > >@@ -158,7 +157,7 @@ sub commit { > my $args = try { > $job->json->decode($job->data); > } catch { >- $logger->debug(sprintf "Cannot decode data for job id=%s", $job->id); >+ $logger->warn(sprintf "Cannot decode data for job id=%s", $job->id); > $job->status('failed')->store; > return; > }; >@@ -174,14 +173,14 @@ sub commit { > try { > $auth_indexer->update_index(\@auth_records); > } catch { >- $logger->debug(sprintf "Update of elastic index failed with: %s", $_); >+ $logger->warn(sprintf "Update of elastic index failed with: %s", $_); > }; > } > if( @bib_records ){ > try { > $biblio_indexer->update_index(\@bib_records); > } catch { >- $logger->debug(sprintf "Update of elastic index failed with: %s", $_); >+ $logger->warn(sprintf "Update of elastic index failed with: %s", $_); > }; > } > >-- >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 32594
:
145145
|
145195
|
145196
|
145197
|
145704
|
145711
|
146402
|
146831
|
147141
|
147460
|
147562
|
148350
|
148513
|
148571
|
148588