dicoogle icon indicating copy to clipboard operation
dicoogle copied to clipboard

Add opt-in `call-shutdown` setting to call plugin shutdown routines on Dicoogle shutdown

Open Enet4 opened this issue 3 years ago • 0 comments

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 shutdown on (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
  • 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

Enet4 avatar Oct 02 '22 12:10 Enet4