diff --git a/lib/galaxy/webapps/galaxy/api/configuration.py b/lib/galaxy/webapps/galaxy/api/configuration.py index 5e5d68695ca..f084afb1305 100644 --- a/lib/galaxy/webapps/galaxy/api/configuration.py +++ b/lib/galaxy/webapps/galaxy/api/configuration.py @@ -150,6 +150,10 @@ def _get_tool_lineages(app): return rval +def _reload_toolbox(app): + app.queue_worker.send_control_task('reload_toolbox') + + @cbv(router) class FastAPIConfiguration: @@ -186,6 +190,11 @@ class FastAPIConfiguration: def tool_lineages(self, app: StructuredApp = Depends(get_app)): return _get_tool_lineages(app) + @router.put('/api/configuration/toolbox') + def reload_toolbox(self, app: StructuredApp = Depends(get_app)): + """Reload the Galaxy toolbox (but not individual tools).""" + _reload_toolbox(app) + class ConfigurationController(BaseAPIController): @@ -246,7 +255,7 @@ class ConfigurationController(BaseAPIController): PUT /api/configuration/toolbox Reload the Galaxy toolbox (but not individual tools). """ - self.app.queue_worker.send_control_task('reload_toolbox') + _reload_toolbox(self.app) def get_config_dict(self, trans, return_admin=False, view=None, keys=None, default_view='all'): # Method left for backward compatibility (templates/galaxy_client_app.mako).