Make checking for for migrated tools when starting the Galaxy server a config setting that defaults to True. This setting should generally be False only for development Galaxy environments that are often set up from scratch (with new db, etc) and migrated tools are not needed in the Galaxy tool panel. In those cases where this setting is False, starting a fresh Galaxy instance (with no checking for migrated tools) will be much faster.

This commit is contained in:
Greg Von Kuster
2014-04-28 15:35:41 -04:00
parent 849590bc9f
commit dac1260d5f
3 changed files with 24 additions and 4 deletions
+2 -1
View File
@@ -40,7 +40,8 @@ class UniverseApplication( object, config.ConfiguresGalaxyMixin ):
# Setup the database engine and ORM
config_file = kwargs.get( 'global_conf', {} ).get( '__file__', None )
self._configure_models( check_migrate_databases=True, check_migrate_tools=True, config_file=config_file )
check_migrate_tools = self.config.check_migrate_tools
self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file )
# Manage installed tool shed repositories.
from tool_shed.galaxy_install import installed_repository_manager
+15 -3
View File
@@ -4,8 +4,12 @@ Universe configuration builder.
# absolute_import needed for tool_shed package.
from __future__ import absolute_import
import sys, os, tempfile, re
import logging, logging.config
import os
import re
import sys
import tempfile
import logging
import logging.config
import ConfigParser
from datetime import timedelta
from galaxy.web.formatting import expand_pretty_datetime_format
@@ -23,11 +27,14 @@ def resolve_path( path, root ):
path = os.path.join( root, path )
return path
class ConfigurationError( Exception ):
pass
class Configuration( object ):
deprecated_options = ( 'database_file', )
def __init__( self, **kwargs ):
self.config_dict = kwargs
self.root = kwargs.get( 'root_dir', '.' )
@@ -87,6 +94,9 @@ class Configuration( object ):
self.user_section_filters = listify( kwargs.get( "user_tool_section_filters", [] ), do_strip=True )
self.tool_configs = [ resolve_path( p, self.root ) for p in listify( tcf ) ]
# Check for tools defined in the above non-shed tool configs (i.e., tool_conf.xml) tht have
# been migrated from the Galaxy code distribution to the Tool Shed.
self.check_migrate_tools = string_as_bool( kwargs.get( 'check_migrate_tools', True ) )
self.shed_tool_data_path = kwargs.get( "shed_tool_data_path", None )
if self.shed_tool_data_path:
self.shed_tool_data_path = resolve_path( self.shed_tool_data_path, self.root )
@@ -397,13 +407,16 @@ class Configuration( object ):
return rval
except ConfigParser.NoSectionError:
return {}
def get( self, key, default ):
return self.config_dict.get( key, default )
def get_bool( self, key, default ):
if key in self.config_dict:
return string_as_bool( self.config_dict[key] )
else:
return default
def check( self ):
paths_to_check = [ self.root, self.tool_path, self.tool_data_path, self.template_path ]
# Check that required directories exist
@@ -488,7 +501,6 @@ def get_database_engine_options( kwargs, model_prefix='' ):
rval[ key ] = value
return rval
def configure_logging( config ):
"""
Allow some basic logging configuration to be read from ini file.
+7
View File
@@ -136,6 +136,13 @@ paste.app_factory = galaxy.web.buildapp:app_factory
# Tools can be locally developed or installed from Galaxy tool sheds.
#tool_config_file = tool_conf.xml,shed_tool_conf.xml
# Enable / disable checking if any tools defined in the above non-shed tool_config_files
# (i.e., tool_conf.xml) have been migrated from the Galaxy code distribution to the Tool
# Shed. This setting should generally be set to False only for development Galaxy environments
# that are often rebuilt from scratch where migrated tools do not need to be available in the
# Galaxy tool panel. If the following setting remains commented, the default setting will be True.
#check_migrate_tools = True
# Default path to the directory containing the tools defined in tool_conf.xml.
# Other tool config files must include the tool_path as an attribute in the <toolbox> tag.
#tool_path = tools