Merge pull request #3732 from nsoranzo/reload_toolbox_merge

Merge ConfiguresGalaxyMixin.reload_toolbox() in _configure_toolbox()
This commit is contained in:
John Chilton
2017-03-09 08:10:48 -05:00
committed by GitHub
2 changed files with 12 additions and 21 deletions
+10 -19
View File
@@ -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(
+2 -2
View File
@@ -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):