Koha/misc
Tomas Cohen Arazi b54c854d24
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>
2024-07-01 18:55:54 +02:00
..
admin
bin Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
cronjobs Bug 32575: Add an empty text body to fix multipart/mixed handling 2024-06-28 13:49:20 +02:00
devel
interface_customization
maintenance Bug 37181: Add --confirm option to pseudonymize_statistics.pl 2024-06-27 14:04:54 +02:00
migration_tools Bug 34481: Tidy altered code 2024-06-27 14:04:50 +02:00
release_notes 24.05.00: Add release notes 2024-05-27 18:26:45 +02:00
search_tools
translator Bug 36845: Do not loop over the content attribute 2024-05-22 16:18:07 +02:00
workers Bug 36901: Add logging for uncaught exceptions in background job classes 2024-07-01 18:55:54 +02:00
add_date_fields_to_marc_records.pl
add_statistics_borrowers_categorycode.pl
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl
export_records.pl
exportauth.pl
import_patrons.pl
koha-install-log
link_bibs_to_authorities.pl
load_yaml.pl
mod_zebraqueue.pl
process_ill_updates.pl
recreateIssueStatistics.pl
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl
stage_file.pl
z3950_responder.pl