mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add fastapi configuration/toolbox endpoint
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user