From 82dce1ea4c75ece27eac50099f261d644a52e96c Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 20 Dec 2023 19:17:43 -0300 Subject: [PATCH] Bug 35624: Allow jobs to pass a calculated job_type parameter --- Koha/BackgroundJob.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm index bcfa68baca1..d6a70160140 100644 --- a/Koha/BackgroundJob.pm +++ b/Koha/BackgroundJob.pm @@ -95,7 +95,7 @@ Return the job_id of the newly created job. sub enqueue { my ( $self, $params ) = @_; - my $job_type = $self->job_type; + my $job_type = $params->{job_type} // $self->job_type; # plugins should pass their own calculated value my $job_size = $params->{job_size}; my $job_args = $params->{job_args}; my $job_context = $params->{job_context} // C4::Context->userenv; -- 2.43.0