Hi there,
I am working on an app that uses a cluster task. When the app is disabled or uninstalled, I want to unschedule the cluster task (because it survives the app being uninstalled).
What I tried is the following:
- Listening for the PluginDisablingEvent: This does not seem to be sent anymore
- Implementing LifecycleAware and using the onStop() method, also does not seem to work anymore
- Implement DisposableBean: While I can detect if the app is stopped, I do not know if that is because the app is uninstalled or the node goes down. Thus, if a node goes down (unless it is the last node), this does not help.
How should I unschedule a cluster task in the best way?
best regards,
Christopher