mentat-enricher.py - When reloaded enrichment plugins should be able to retain their internal state
|Assignee:||Jan Mach||% Done:|
|Category:||Development - Core|
Currently all enrichment plugins are hard reloaded and their internal state is lost. This behavior was sufficient for all currently implemented plugins, however in some use cases this approach results in data and performance loss (for example in case of enrichment plugins which use internal caching mechanism).
Fix: Enricher plugins can now keep their internal state during reloads.
Previously the enrichment plugin reload was hardcoded in a way, that during the reload a brand new instance of the plugin was created, which resulted in discarding of the internal state of the plugin. For some use cases this was not appropriate. The plugin reload event is now implemented differently, so the insternal state is kept. (Redmine issue: #4262)
- Status changed from New to Closed
- % Done changed from 0 to 100
Resolved this issue by not discarding the whole plugin instances during reload. Instead the plugin`s setup() method is called on each of the plugins. So it is up to the plugin to decide whether it is time to reload internal state.