https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132246|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <[email protected]> --- Created attachment 132298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132298&action=edit Bug 30350: Avoid hardcoding job types in background_jobs_worker.pl Currently, background_jobs_worker.pl has a hardcoded list of jobs it can process. Koha::BackgroundJob already has a method that can be used to extract such list. Using it would avoid having to maintain two lists, and it would also make it easier to inject plugin tasks as well. To test: 1. Apply the patch 2. Restart the koha-worker 3. Run one of the batch operations that make use of the background jobs (I used batch item delete) => SUCCESS: Things work, no change 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <[email protected]> JD amended patch -my @job_types = keys %{Koha::BackgroundJob::type_to_class_mapping}; +my @job_types = keys %{Koha::BackgroundJob::type_to_class_mapping()}; To remove the following error: Ambiguous use of %{Koha::BackgroundJob::type_to_class_mapping} resolved to %Koha::BackgroundJob::type_to_class_mapping Signed-off-by: Jonathan Druart <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
