2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

Maintenance mode update (#6473)

- Add check for exiting maintenance mode after reloading plugin registry
This commit is contained in:
Oliver
2024-02-13 14:04:00 +11:00
committed by GitHub
parent 0c2f1cceb6
commit f3ca704e97

View File

@ -337,6 +337,8 @@ class PluginsRegistry:
collect,
)
_maintenance_mode = get_maintenance_mode()
with maintenance_mode_on():
if collect:
logger.info('Collecting plugins')
@ -347,6 +349,10 @@ class PluginsRegistry:
self.plugins_loaded = True
self._load_plugins(full_reload=full_reload)
# Check if we wish to exit maintenance mode
if not _maintenance_mode:
set_maintenance_mode(False)
self.update_plugin_hash()
self.loading_lock.release()