From 69a012a88fa965986d2d865d15e20418adddcf55 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 2 Dec 2022 14:43:27 +0100 Subject: [PATCH] Bug 32394: Restore long tasks queue We are sending "queue" as parameter, but "job_queue" is retrieved in Koha::BackgroundJob->enqueue... Test plan: Read code and confirm the above. More fun for test plan will be found on bug 32393 Signed-off-by: Tomas Cohen Arazi Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 9810fc5e0e425b9947589630d2d598eec22262e9) Signed-off-by: Martin Renvoize --- Koha/BackgroundJob/BatchCancelHold.pm | 6 +++--- Koha/BackgroundJob/BatchDeleteAuthority.pm | 6 +++--- Koha/BackgroundJob/BatchDeleteBiblio.pm | 6 +++--- Koha/BackgroundJob/BatchDeleteItem.pm | 2 +- Koha/BackgroundJob/BatchUpdateAuthority.pm | 6 +++--- Koha/BackgroundJob/BatchUpdateBiblio.pm | 6 +++--- Koha/BackgroundJob/BatchUpdateItem.pm | 6 +++--- Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm | 6 +++--- Koha/BackgroundJob/MARCImportCommitBatch.pm | 6 +++--- Koha/BackgroundJob/MARCImportRevertBatch.pm | 6 +++--- Koha/BackgroundJob/StageMARCForImport.pm | 6 +++--- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Koha/BackgroundJob/BatchCancelHold.pm b/Koha/BackgroundJob/BatchCancelHold.pm index cf730a6d3f..421f7b76cf 100644 --- a/Koha/BackgroundJob/BatchCancelHold.pm +++ b/Koha/BackgroundJob/BatchCancelHold.pm @@ -135,9 +135,9 @@ sub enqueue { $self->SUPER::enqueue( { - job_size => scalar @hold_ids, - job_args => { hold_ids => \@hold_ids, reason => $args->{reason} }, - queue => 'long_tasks', + job_size => scalar @hold_ids, + job_args => { hold_ids => \@hold_ids, reason => $args->{reason} }, + job_queue => 'long_tasks', } ); } diff --git a/Koha/BackgroundJob/BatchDeleteAuthority.pm b/Koha/BackgroundJob/BatchDeleteAuthority.pm index 29c1f5b3ec..f0688cc6b3 100644 --- a/Koha/BackgroundJob/BatchDeleteAuthority.pm +++ b/Koha/BackgroundJob/BatchDeleteAuthority.pm @@ -103,9 +103,9 @@ sub enqueue { my @record_ids = @{ $args->{record_ids} }; $self->SUPER::enqueue({ - job_size => scalar @record_ids, - job_args => {record_ids => \@record_ids,}, - queue => 'long_tasks', + job_size => scalar @record_ids, + job_args => {record_ids => \@record_ids,}, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/BatchDeleteBiblio.pm b/Koha/BackgroundJob/BatchDeleteBiblio.pm index b87d255a08..74867c19b6 100644 --- a/Koha/BackgroundJob/BatchDeleteBiblio.pm +++ b/Koha/BackgroundJob/BatchDeleteBiblio.pm @@ -192,9 +192,9 @@ sub enqueue { my @record_ids = @{ $args->{record_ids} }; $self->SUPER::enqueue({ - job_size => scalar @record_ids, - job_args => {record_ids => \@record_ids,}, - queue => 'long_tasks', + job_size => scalar @record_ids, + job_args => {record_ids => \@record_ids,}, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/BatchDeleteItem.pm b/Koha/BackgroundJob/BatchDeleteItem.pm index d26504d8e2..7e30c6a2af 100644 --- a/Koha/BackgroundJob/BatchDeleteItem.pm +++ b/Koha/BackgroundJob/BatchDeleteItem.pm @@ -237,7 +237,7 @@ sub enqueue { record_ids => \@record_ids, delete_biblios => $delete_biblios, }, - queue => 'long_tasks', + job_queue => 'long_tasks', } ); } diff --git a/Koha/BackgroundJob/BatchUpdateAuthority.pm b/Koha/BackgroundJob/BatchUpdateAuthority.pm index 23079672ff..c4625734c5 100644 --- a/Koha/BackgroundJob/BatchUpdateAuthority.pm +++ b/Koha/BackgroundJob/BatchUpdateAuthority.pm @@ -134,9 +134,9 @@ sub enqueue { my @record_ids = @{ $args->{record_ids} }; $self->SUPER::enqueue({ - job_size => scalar @record_ids, - job_args => {mmtid => $mmtid, record_ids => \@record_ids,}, - queue => 'long_tasks', + job_size => scalar @record_ids, + job_args => {mmtid => $mmtid, record_ids => \@record_ids,}, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm index 5b4d6b143b..8322962d47 100644 --- a/Koha/BackgroundJob/BatchUpdateBiblio.pm +++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm @@ -142,9 +142,9 @@ sub enqueue { return unless exists $args->{record_ids}; $self->SUPER::enqueue({ - job_size => scalar @{$args->{record_ids}}, - job_args => $args, - queue => 'long_tasks', + job_size => scalar @{$args->{record_ids}}, + job_args => $args, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm index d389ab97e2..82d27ec34f 100644 --- a/Koha/BackgroundJob/BatchUpdateItem.pm +++ b/Koha/BackgroundJob/BatchUpdateItem.pm @@ -154,9 +154,9 @@ sub enqueue { $self->SUPER::enqueue( { - job_size => scalar @record_ids, - job_args => {%$args}, - queue => 'long_tasks', + job_size => scalar @record_ids, + job_args => {%$args}, + job_queue => 'long_tasks', } ); } diff --git a/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm b/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm index 6ad61f3318..c57c223312 100644 --- a/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm +++ b/Koha/BackgroundJob/CreateEHoldingsFromBiblios.pm @@ -207,9 +207,9 @@ sub enqueue { return unless exists $args->{record_ids}; $self->SUPER::enqueue({ - job_size => scalar @{$args->{record_ids}}, - job_args => $args, - queue => 'long_tasks', + job_size => scalar @{$args->{record_ids}}, + job_args => $args, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/MARCImportCommitBatch.pm b/Koha/BackgroundJob/MARCImportCommitBatch.pm index c2090617d1..ac1c47acda 100644 --- a/Koha/BackgroundJob/MARCImportCommitBatch.pm +++ b/Koha/BackgroundJob/MARCImportCommitBatch.pm @@ -116,9 +116,9 @@ sub enqueue { my ( $self, $args) = @_; $self->SUPER::enqueue({ - job_size => Koha::Import::Records->search({ import_batch_id => $args->{import_batch_id} })->count, - job_args => $args, - queue => 'long_tasks', + job_size => Koha::Import::Records->search({ import_batch_id => $args->{import_batch_id} })->count, + job_args => $args, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/MARCImportRevertBatch.pm b/Koha/BackgroundJob/MARCImportRevertBatch.pm index c2c8133281..b9d7c6e59c 100644 --- a/Koha/BackgroundJob/MARCImportRevertBatch.pm +++ b/Koha/BackgroundJob/MARCImportRevertBatch.pm @@ -112,9 +112,9 @@ sub enqueue { my ( $self, $args) = @_; $self->SUPER::enqueue({ - job_size => Koha::Import::Records->search({ import_batch_id => $args->{import_batch_id} })->count, - job_args => $args, - queue => 'long_tasks', + job_size => Koha::Import::Records->search({ import_batch_id => $args->{import_batch_id} })->count, + job_args => $args, + job_queue => 'long_tasks', }); } diff --git a/Koha/BackgroundJob/StageMARCForImport.pm b/Koha/BackgroundJob/StageMARCForImport.pm index 206bb8b186..423bc64bb5 100644 --- a/Koha/BackgroundJob/StageMARCForImport.pm +++ b/Koha/BackgroundJob/StageMARCForImport.pm @@ -197,9 +197,9 @@ sub enqueue { my ( $self, $args) = @_; $self->SUPER::enqueue({ - job_size => 0, # TODO Unknown for now? - job_args => $args, - queue => 'long_tasks', + job_size => 0, # TODO Unknown for now? + job_args => $args, + job_queue => 'long_tasks', }); } -- 2.39.5