Bug 30897: Gracefully restart plack after plugin install/remove
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 10 Apr 2024 08:54:48 +0000 (10:54 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 11 Apr 2024 14:53:41 +0000 (16:53 +0200)
commit0a0487d8841ec8f57c5795827fb3aecae1a9a62b
treec907bbfa9b3fdf95da8d3362ff36bd03f89bf664
parent747f5132311ea51ea6babbfc92a775ac0c67f93a
Bug 30897: Gracefully restart plack after plugin install/remove

This patch adds a graceful plack restart to the plugin
install/uninstall routine to fully allow plugin install to work via the
staff client.

Test plan
1. list your worker processes with something like htop
2. install a plugin
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases
3. note that the PIDs of the workers stay the same and no sign of
   restart (no PID changes and no CPU activity that the workers would
   have if they were starting)
4. apply patches and restart services
5. unistall plugin
6. notice worker restart
7. install plugin
8. notice worker restart
9. downgrade plugin
10. notice worker restart
11. upgrade plugin
12. notice worker restart
13. disable and enable plugin
14. *no restart*

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Plugins.pm