From 75e7a943f4413514d3d9ca3c65b52e71295a24b4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 17 Nov 2024 06:18:06 +0000 Subject: [PATCH] Remove PLUGIN_ON_STARTUP support --- docs/docs/settings/global.md | 1 - src/backend/InvenTree/common/models.py | 10 ---------- src/backend/InvenTree/plugin/apps.py | 12 ------------ 3 files changed, 23 deletions(-) diff --git a/docs/docs/settings/global.md b/docs/docs/settings/global.md index 241ac74f0d..6540e9acde 100644 --- a/docs/docs/settings/global.md +++ b/docs/docs/settings/global.md @@ -210,7 +210,6 @@ Refer to the [return order settings](../order/return_order.md#return-order-setti | Name | Description | Default | Units | | ---- | ----------- | ------- | ----- | -{{ globalsetting("PLUGIN_ON_STARTUP") }} {{ globalsetting("PLUGIN_UPDATE_CHECK") }} {{ globalsetting("ENABLE_PLUGINS_URL") }} {{ globalsetting("ENABLE_PLUGINS_NAVIGATION") }} diff --git a/src/backend/InvenTree/common/models.py b/src/backend/InvenTree/common/models.py index fb57bfa67d..e0de692135 100644 --- a/src/backend/InvenTree/common/models.py +++ b/src/backend/InvenTree/common/models.py @@ -2110,16 +2110,6 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'default': False, 'validator': bool, }, - 'PLUGIN_ON_STARTUP': { - 'name': _('Check plugins on startup'), - 'description': _( - 'Check that all plugins are installed on startup - enable in container environments' - ), - 'default': str(os.getenv('INVENTREE_DOCKER', 'False')).lower() - in ['1', 'true'], - 'validator': bool, - 'requires_restart': True, - }, 'PLUGIN_UPDATE_CHECK': { 'name': _('Check for plugin updates'), 'description': _('Enable periodic checks for updates to installed plugins'), diff --git a/src/backend/InvenTree/plugin/apps.py b/src/backend/InvenTree/plugin/apps.py index fa7801d72e..f0dd345561 100644 --- a/src/backend/InvenTree/plugin/apps.py +++ b/src/backend/InvenTree/plugin/apps.py @@ -40,18 +40,6 @@ class PluginAppConfig(AppConfig): logger.info('Loading InvenTree plugins') if not registry.is_loading: - # this is the first startup - try: - from common.models import InvenTreeSetting - - if InvenTreeSetting.get_setting( - 'PLUGIN_ON_STARTUP', create=False, cache=False - ): - # make sure all plugins are installed - registry.install_plugin_file() - except Exception: # pragma: no cover - pass - # Perform a full reload of the plugin registry registry.reload_plugins( full_reload=True, force_reload=True, collect=True