Bugzilla – Attachment 132850 Details for
Bug 27783
Introduce background job queues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27783: Rename queues and adjust currently defined jobs
Bug-27783-Rename-queues-and-adjust-currently-defin.patch (text/plain), 4.52 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-04-01 12:03:42 UTC
(
hide
)
Description:
Bug 27783: Rename queues and adjust currently defined jobs
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-04-01 12:03:42 UTC
Size:
4.52 KB
patch
obsolete
>From fa71b3e8ed23f8ca27c2053110d9a5f3f4143b1b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 1 Apr 2022 13:56:09 +0200 >Subject: [PATCH] Bug 27783: Rename queues and adjust currently defined jobs > >This patch renames the queues so the default is the **real-time** one, and >the other (*turtle*) is kept for **slow** tasks. > >All current *batch* tasks are explicitly assigned to the **turtle** >queue as well. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/BackgroundJob/BatchCancelHold.pm | 3 ++- > Koha/BackgroundJob/BatchDeleteAuthority.pm | 3 ++- > Koha/BackgroundJob/BatchDeleteBiblio.pm | 3 ++- > Koha/BackgroundJob/BatchDeleteItem.pm | 3 ++- > Koha/BackgroundJob/BatchUpdateAuthority.pm | 3 ++- > Koha/BackgroundJob/BatchUpdateBiblio.pm | 1 + > Koha/BackgroundJob/BatchUpdateItem.pm | 1 + > misc/background_jobs_worker.pl | 2 +- > 8 files changed, 13 insertions(+), 6 deletions(-) > >diff --git a/Koha/BackgroundJob/BatchCancelHold.pm b/Koha/BackgroundJob/BatchCancelHold.pm >index ba85cfc63d..7f019c03e5 100644 >--- a/Koha/BackgroundJob/BatchCancelHold.pm >+++ b/Koha/BackgroundJob/BatchCancelHold.pm >@@ -136,7 +136,8 @@ sub enqueue { > $self->SUPER::enqueue( > { > job_size => scalar @hold_ids, >- job_args => { hold_ids => \@hold_ids, reason => $args->{reason} } >+ job_args => { hold_ids => \@hold_ids, reason => $args->{reason} }, >+ queue => 'turtle', > } > ); > } >diff --git a/Koha/BackgroundJob/BatchDeleteAuthority.pm b/Koha/BackgroundJob/BatchDeleteAuthority.pm >index 0f2151976f..c6679a1253 100644 >--- a/Koha/BackgroundJob/BatchDeleteAuthority.pm >+++ b/Koha/BackgroundJob/BatchDeleteAuthority.pm >@@ -89,7 +89,8 @@ sub enqueue { > > $self->SUPER::enqueue({ > job_size => scalar @record_ids, >- job_args => {record_ids => \@record_ids,} >+ job_args => {record_ids => \@record_ids,}, >+ queue => 'turtle', > }); > } > >diff --git a/Koha/BackgroundJob/BatchDeleteBiblio.pm b/Koha/BackgroundJob/BatchDeleteBiblio.pm >index 0c95c6352c..678bb3f647 100644 >--- a/Koha/BackgroundJob/BatchDeleteBiblio.pm >+++ b/Koha/BackgroundJob/BatchDeleteBiblio.pm >@@ -174,7 +174,8 @@ sub enqueue { > > $self->SUPER::enqueue({ > job_size => scalar @record_ids, >- job_args => {record_ids => \@record_ids,} >+ job_args => {record_ids => \@record_ids,}, >+ queue => 'turtle', > }); > } > >diff --git a/Koha/BackgroundJob/BatchDeleteItem.pm b/Koha/BackgroundJob/BatchDeleteItem.pm >index b4bcbfa6a8..80c58ea4f2 100644 >--- a/Koha/BackgroundJob/BatchDeleteItem.pm >+++ b/Koha/BackgroundJob/BatchDeleteItem.pm >@@ -215,7 +215,8 @@ sub enqueue { > job_args => { > record_ids => \@record_ids, > delete_biblios => $delete_biblios, >- } >+ }, >+ queue => 'turtle', > } > ); > } >diff --git a/Koha/BackgroundJob/BatchUpdateAuthority.pm b/Koha/BackgroundJob/BatchUpdateAuthority.pm >index 482acf892c..e828cb081a 100644 >--- a/Koha/BackgroundJob/BatchUpdateAuthority.pm >+++ b/Koha/BackgroundJob/BatchUpdateAuthority.pm >@@ -130,7 +130,8 @@ sub enqueue { > > $self->SUPER::enqueue({ > job_size => scalar @record_ids, >- job_args => {mmtid => $mmtid, record_ids => \@record_ids,} >+ job_args => {mmtid => $mmtid, record_ids => \@record_ids,}, >+ queue => 'turtle', > }); > } > >diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm >index 21e938f191..e18826e4ee 100644 >--- a/Koha/BackgroundJob/BatchUpdateBiblio.pm >+++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm >@@ -136,6 +136,7 @@ sub enqueue { > $self->SUPER::enqueue({ > job_size => scalar @{$args->{record_ids}}, > job_args => $args, >+ queue => 'turtle', > }); > } > >diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm >index 7e7ae38fb2..4add50bb43 100644 >--- a/Koha/BackgroundJob/BatchUpdateItem.pm >+++ b/Koha/BackgroundJob/BatchUpdateItem.pm >@@ -157,6 +157,7 @@ sub enqueue { > { > job_size => scalar @record_ids, > job_args => {%$args}, >+ queue => 'turtle', > } > ); > } >diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl >index c9495d0e87..1858bd21fb 100755 >--- a/misc/background_jobs_worker.pl >+++ b/misc/background_jobs_worker.pl >@@ -41,7 +41,7 @@ Repeatable. Give the job queues this worker will process. > The different values available are: > > default >- index >+ turtle > > =back > >-- >2.35.1
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 27783
:
132642
|
132644
|
132649
|
132650
|
132651
|
132846
|
132847
|
132848
|
132849
|
132850
|
132875
|
132876
|
132877
|
132878
|
132879
|
132880
|
132948
|
132950
|
132951
|
133160
|
133161
|
133162
|
133163
|
133164
|
133165
|
133166
|
133167
|
133168
|
133169
|
133170
|
133171
|
133172
|
133173
|
133174
|
133175
|
133176
|
133177
|
133178
|
133179