Koha-clms/misc
Tomas Cohen Arazi cc8f03cf2b Bug 36901: Add logging for uncaught exceptions in background job classes
This patch adds logging of unhandled exceptions that could occur. This
is happening on busy production sites right now. This is also useful for
plugin jobs that might not be 100% following the guidelines and would
benefit from this.

But as the [DO NOT PUSH] patch highlights, this is something we really
want to have on our current codebase, as a database connection drop
might make us reach that `catch` block we are adding logging to on this
patch.

To test:
1. Apply the [DO NOT PUSH] patch
2. Run:
   $ ktd --shell
  k$ restart_all ; tail -f /var/log/koha/kohadev/worker*.log
3. Pick a valid barcode on the staff UI
4. Use the 'Batch delete items' tool in the cataloguing section
5. Start the job for deleting the item
=> FAIL: The item got deleted, but the job marked as failed and no logs
about the reasons
6. Apply this patch and repeat 2-5
=> SUCCESS: Same scenario but there's a log with the error message
7. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b54c854d24)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-11-18 17:18:00 +00:00
..
admin Bug 31325: Fix koha-preferences get 2022-08-16 09:11:40 -03:00
bin Bug 37543: (follow-up) Tidy 2024-09-06 16:40:57 +00:00
cronjobs Bug 32575: Add an empty text body to fix multipart/mixed handling 2024-11-18 17:10:34 +00:00
devel Bug 36309: Make create_superlibrarian.pl output more useful 2024-04-22 08:57:35 +02:00
interface_customization
…
maintenance Bug 31143: (follow-up) Add description to fix_invalid_dates.pl 2024-11-15 16:01:44 +00:00
migration_tools Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-07 23:02:54 +00:00
release_notes Generate release notes for 24.05.05 release 2024-11-07 23:15:54 +00:00
search_tools Bug 35345: Add --where option to rebuild_elasticsearch.pl 2024-04-22 12:39:26 +02:00
translator Bug 38164: Skip fuzzy translations 2024-10-23 22:51:09 +00:00
workers Bug 36901: Add logging for uncaught exceptions in background job classes 2024-11-18 17:18:00 +00:00
add_date_fields_to_marc_records.pl Bug 23924: Reset the fields to add 2023-05-05 12:13:53 -03:00
add_statistics_borrowers_categorycode.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
batchCompareMARCvsFrameworks.pl
…
batchDeleteUnusedSubfields.pl
…
batchImportMARCWithBiblionumbers.pl
…
batchRebuildBiblioTables.pl Bug 30813: Update TransformMarcToKoha to accept a hashref 2022-06-08 11:40:29 -03:00
batchRebuildItemsTables.pl Bug 29697: Use flag embed_items 2022-07-22 15:24:11 -03:00
batchRepairMissingBiblionumbers.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
batchdeletebiblios.pl
…
check_sysprefs.pl
…
commit_file.pl Bug 15869: Change framework on overlay 2023-02-07 10:32:22 -03:00
export_borrowers.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-07 23:02:54 +00:00
export_records.pl Bug 31286: Embed see-from headings into bibliographic records export 2024-03-25 09:53:24 +01:00
exportauth.pl
…
import_patrons.pl Bug 34621: Tidy import_patrons.pl 2024-04-12 14:02:43 +02:00
koha-install-log
…
link_bibs_to_authorities.pl Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink 2023-11-03 14:22:45 -03:00
load_yaml.pl
…
mod_zebraqueue.pl
…
process_ill_updates.pl Bug 35581: Koha::Illrequest -> Koha::ILL::Request 2024-04-22 08:57:45 +02:00
recreateIssueStatistics.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to recreateIssueStatistics.pl 2024-03-01 10:57:15 +01:00
sax_parser_print.pl
…
sax_parser_test.pl
…
sip_cli_emulator.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to sip_cli_emulator.pl 2024-03-01 10:57:14 +01:00
stage_file.pl
…
z3950_responder.pl
…