Bugzilla – Attachment 148571 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: Mark jobs as started and finished
Bug-32594-Mark-jobs-as-started-and-finished.patch (text/plain), 1.30 KB, created by
Nick Clemens (kidclamp)
on 2023-03-22 19:57:39 UTC
(
hide
)
Description:
Bug 32594: Mark jobs as started and finished
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-22 19:57:39 UTC
Size:
1.30 KB
patch
obsolete
>From 5e5aea09f3291b9b9bf5fb8ff11129dbafa46d96 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 17 Mar 2023 14:22:24 +0000 >Subject: [PATCH] Bug 32594: Mark jobs as started and finished > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > misc/workers/es_indexer_daemon.pl | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >diff --git a/misc/workers/es_indexer_daemon.pl b/misc/workers/es_indexer_daemon.pl >index 3acfc6e252..89e3b5cb0f 100755 >--- a/misc/workers/es_indexer_daemon.pl >+++ b/misc/workers/es_indexer_daemon.pl >@@ -151,6 +151,15 @@ sub commit { > > my @bib_records; > my @auth_records; >+ >+ my $jobs = Koha::BackgroundJobs->search( { id => [ map { $_->id } @jobs ] }); >+ # Start >+ $jobs->update({ >+ progress => 0, >+ status => 'started', >+ started_on => \'NOW()', >+ }); >+ > for my $job (@jobs) { > my $args = try { > $job->json->decode( $job->data ); >@@ -182,5 +191,10 @@ sub commit { > }; > } > >- Koha::BackgroundJobs->search( { id => [ map { $_->id } @jobs ] } )->update( { status => 'finished', progress => 1 }, { no_triggers => 1 } ); >+ # Finish >+ $jobs->update({ >+ progress => 1, >+ status => 'finished', >+ ended_on => \'NOW()', >+ }); > } >-- >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