mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-15 23:21:32 +00:00
Plugin reload mechanism (#5649)
* Plugin reload mechanism - Wrap reload_plugins with mutex lock - Add methods for calculating plugin registry hash * Perform plugin reload at critical entry points to the registry - Background worker will correctly reload registry before performing tasks - Ensures that the background worker plugin regsistry is up to date
This commit is contained in:
@@ -37,7 +37,7 @@ class SettingsMixin:
|
||||
Add all defined settings form the plugins to a unified dict in the registry.
|
||||
This dict is referenced by the PluginSettings for settings definitions.
|
||||
"""
|
||||
logger.info('Activating plugin settings')
|
||||
logger.debug('Activating plugin settings')
|
||||
|
||||
registry.mixins_settings = {}
|
||||
|
||||
@@ -49,7 +49,7 @@ class SettingsMixin:
|
||||
@classmethod
|
||||
def _deactivate_mixin(cls, registry, **kwargs):
|
||||
"""Deactivate all plugin settings."""
|
||||
logger.info('Deactivating plugin settings')
|
||||
logger.debug('Deactivating plugin settings')
|
||||
# clear settings cache
|
||||
registry.mixins_settings = {}
|
||||
|
||||
|
Reference in New Issue
Block a user