Koha/misc/migration_tools
Fridolin Somers bfcc7cad70 Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process
When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever.
But if something crashes inside the rebuild process, the all daemon crashes.
For example when it can not access database.
This problem may be temporary so daemon should keep running.

This patch add eval around the rebuild process to allow a run to fail without killing the daemon.
Also moves the DB handler get inside daemon loop because it is broken is DB stoppes.

This is a big issue for indexer running in a systemd service.

Test plan :
- run rebuild_zebra.pl in daemon mode :
/home/koha/src/misc/migration_tools/rebuild_zebra.pl -daemon -z -a -b -x --sleep 30
- stop the database
- wait a minute
=> you see an error on database connexion
=> the daemon is still running
- restart the database
- test the indexer by creating a new record (wait for a minute)

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 11:28:37 +00:00
..
22_to_30
build_oai_sets.pl
buildCOUNTRY.pl
buildEDITORS.pl
buildLANG.pl
bulkmarcimport.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
checkNonIndexedBiblios.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
create_analytical_rel.pl
fix_onloan.pl
import_lexile.pl
koha-svc.pl
merge_authority.pl Bug 16010: follow-up of 15381 - FIX merge_authorities migration script 2016-03-21 18:28:46 +00:00
rebuild_zebra.pl Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process 2016-10-28 11:28:37 +00:00
rebuild_zebra_sliced.sh
remove_unused_authorities.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
switch_marc21_series_info.pl
upgradeitems.pl