dicoogle
dicoogle copied to clipboard
Add opt-in `call-shutdown` setting to call plugin shutdown routines on Dicoogle shutdown
Although I was originally thinking about bringing the shutdown hook to call shutdown() on all plugin sets in Dicoogle 4, we felt that there was a need to have this earlier. This PR makes this capability opt-in, so that it does not require any breaking changes and does not lead to surprising behaviors.
Resolves #149.
- New server settings XML element
<call-shutdown>in<archive>- if true, Dicoogle will call
shutdownon (not dead) plugin sets installed - this is false by default, but the plan is to make it true by default (opt-out) in Dicoogle 4, and maybe even deprecate it, so that in later versions the behavior becomes mandatory.
- add test coverage for call-shutdown setting
- if true, Dicoogle will call
- add shutdown hook to call
PluginController.shutdown- Although we've had issues with this when interoperating with Sentry, we currently believe that this functionality is more important than Sentry integration.
- improve
PluginController.shutdown()by catching and reporting all exceptions individually