Bugzilla – Attachment 133165 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.62 KB, created by
Kyle M Hall (khall)
on 2022-04-11 14:16:27 UTC
(
hide
)
Description:
Bug 27783: Rename queues and adjust currently defined jobs
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-04-11 14:16:27 UTC
Size:
4.62 KB
patch
obsolete
>From a9bfb29efb986f3234fa3ef89c99ccb3126e5240 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 (*long_tasks*) is kept for **long running** tasks. > >All current *batch* tasks are explicitly assigned to the **long_tasks** >queue as well. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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..51648aecec 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 => 'long_tasks', > } > ); > } >diff --git a/Koha/BackgroundJob/BatchDeleteAuthority.pm b/Koha/BackgroundJob/BatchDeleteAuthority.pm >index 0f2151976f..3983ffd1e4 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 => 'long_tasks', > }); > } > >diff --git a/Koha/BackgroundJob/BatchDeleteBiblio.pm b/Koha/BackgroundJob/BatchDeleteBiblio.pm >index 0c95c6352c..efd9af2bf4 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 => 'long_tasks', > }); > } > >diff --git a/Koha/BackgroundJob/BatchDeleteItem.pm b/Koha/BackgroundJob/BatchDeleteItem.pm >index b4bcbfa6a8..da6039dd9e 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 => 'long_tasks', > } > ); > } >diff --git a/Koha/BackgroundJob/BatchUpdateAuthority.pm b/Koha/BackgroundJob/BatchUpdateAuthority.pm >index a8b4c858e6..9b5f89b7d7 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 => 'long_tasks', > }); > } > >diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm >index 21e938f191..e8022c0d49 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 => 'long_tasks', > }); > } > >diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm >index 7e7ae38fb2..d01aed7f39 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 => 'long_tasks', > } > ); > } >diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl >index c9495d0e87..5730d7c8ae 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 >+ long_tasks > > =back > >-- >2.20.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