mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #3732 from nsoranzo/reload_toolbox_merge
Merge ConfiguresGalaxyMixin.reload_toolbox() in _configure_toolbox()
This commit is contained in:
+10
-19
@@ -903,34 +903,25 @@ class ConfiguresGalaxyMixin:
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
def reload_toolbox(self):
|
||||
# Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file.
|
||||
|
||||
tool_configs = self.config.tool_configs
|
||||
if self.config.migrated_tools_config not in tool_configs:
|
||||
tool_configs.append( self.config.migrated_tools_config )
|
||||
|
||||
from galaxy import tools
|
||||
old_toolbox = self.toolbox
|
||||
self.toolbox = tools.ToolBox( tool_configs, self.config.tool_path, self )
|
||||
self.reindex_tool_search()
|
||||
if old_toolbox:
|
||||
old_toolbox.shutdown()
|
||||
|
||||
def _configure_toolbox( self ):
|
||||
from galaxy import tools
|
||||
from galaxy.managers.citations import CitationsManager
|
||||
self.citations_manager = CitationsManager( self )
|
||||
|
||||
from galaxy.tools.deps import containers
|
||||
from galaxy.tools.toolbox.cache import ToolCache
|
||||
from galaxy.tools.toolbox.lineages.tool_shed import ToolVersionCache
|
||||
|
||||
self.citations_manager = CitationsManager( self )
|
||||
self.tool_cache = ToolCache()
|
||||
self.tool_version_cache = ToolVersionCache(self)
|
||||
|
||||
self._toolbox_lock = threading.RLock()
|
||||
self.toolbox = None
|
||||
self.reload_toolbox()
|
||||
# Initialize the tools, making sure the list of tool configs includes the reserved migrated_tools_conf.xml file.
|
||||
tool_configs = self.config.tool_configs
|
||||
if self.config.migrated_tools_config not in tool_configs:
|
||||
tool_configs.append( self.config.migrated_tools_config )
|
||||
self.toolbox = tools.ToolBox( tool_configs, self.config.tool_path, self )
|
||||
self.reindex_tool_search()
|
||||
|
||||
from galaxy.tools.deps import containers
|
||||
galaxy_root_dir = os.path.abspath(self.config.root)
|
||||
file_path = os.path.abspath(getattr(self.config, "file_path"))
|
||||
app_info = containers.AppInfo(
|
||||
|
||||
@@ -226,13 +226,13 @@ class GalaxyQueueWorker(ConsumerMixin, threading.Thread):
|
||||
if body.get('noop', None) != self.app.config.server_name:
|
||||
try:
|
||||
f = self.task_mapping[body['task']]
|
||||
log.info("Instance '%s' recieved '%s' task, executing now.", self.app.config.server_name, body['task'])
|
||||
log.info("Instance '%s' received '%s' task, executing now.", self.app.config.server_name, body['task'])
|
||||
f(self.app, **body['kwargs'])
|
||||
except Exception:
|
||||
# this shouldn't ever throw an exception, but...
|
||||
log.exception("Error running control task type: %s" % body['task'])
|
||||
else:
|
||||
log.warning("Recieved a malformed task message:\n%s" % body)
|
||||
log.warning("Received a malformed task message:\n%s" % body)
|
||||
message.ack()
|
||||
|
||||
def shutdown(self):
|
||||
|
||||
Reference in New Issue
Block a user