Bugzilla – Attachment 149443 Details for
Bug 33486
Remove Koha::BackgroundJob::UpdateElasticIndex->process routine
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process
Bug-33486-Remove-KohaBackgroundJobUpdateElasticInd.patch (text/plain), 2.06 KB, created by
Nick Clemens (kidclamp)
on 2023-04-11 13:44:14 UTC
(
hide
)
Description:
Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-04-11 13:44:14 UTC
Size:
2.06 KB
patch
obsolete
>From afbcf46944834aed2ff1e14379c49c832d89cccd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 11 Apr 2023 13:43:51 +0000 >Subject: [PATCH] Bug 33486: Remove > Koha::BackgroundJob::UpdateElasticIndex->process > >--- > Koha/BackgroundJob/UpdateElasticIndex.pm | 59 +++++------------------- > 1 file changed, 11 insertions(+), 48 deletions(-) > >diff --git a/Koha/BackgroundJob/UpdateElasticIndex.pm b/Koha/BackgroundJob/UpdateElasticIndex.pm >index 55c50a1295..1949728077 100644 >--- a/Koha/BackgroundJob/UpdateElasticIndex.pm >+++ b/Koha/BackgroundJob/UpdateElasticIndex.pm >@@ -42,54 +42,17 @@ sub job_type { > return 'update_elastic_index'; > } > >-=head3 process >- >-Process the modification. >- >-=cut >- >-sub process { >- my ( $self, $args ) = @_; >- >- $self->start; >- >- my @record_ids = @{ $args->{record_ids} }; >- my $record_server = $args->{record_server}; >- >- my $report = { >- total_records => scalar @record_ids, >- total_success => 0, >- }; >- >- my @messages; >- eval { >- my $es_index = >- $record_server eq "authorityserver" >- ? $Koha::SearchEngine::AUTHORITIES_INDEX >- : $Koha::SearchEngine::BIBLIOS_INDEX; >- my $indexer = Koha::SearchEngine::Indexer->new({ index => $es_index }); >- $indexer->update_index(\@record_ids); >- }; >- if ( $@ ) { >- warn $@; >- push @messages, { >- type => 'error', >- code => 'index_error', >- error => $@, >- >- } >- } else { >- $self->step; >- # FIXME This is not correct if some record_ids have been skipped >- $report->{total_success} = scalar @record_ids; >- } >- >- my $data = $self->decoded_data; >- $data->{messages} = \@messages; >- $data->{report} = $report; >- >- $self->finish( $data ); >-} >+# While most background jobs provide this method, the ES indexing has its own dedicated worker: >+# misc/workers/es_index_daemon.pl >+# That worker will handle all job processing. >+#=head3 process >+# >+#Process the modification. >+# >+#=cut >+# >+#sub process { >+#} > > =head3 enqueue > >-- >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 33486
:
149443
|
149584