def _get_new_toolbox(app):
 from galaxy import tools
 from galaxy.tools.special_tools import load_lib_tools
 from galaxy.tools.toolbox.lineages.tool_shed import ToolVersionCache
 app.tool_version_cache = ToolVersionCache(app)
 tool_configs = app.config.tool_configs
 if (app.config.migrated_tools_config not in tool_configs):
  tool_configs.append(app.config.migrated_tools_config)
 start = time.time()
 new_toolbox = tools.ToolBox(tool_configs, app.config.tool_path, app, app.toolbox._tool_conf_watcher)
 new_toolbox.data_manager_tools = app.toolbox.data_manager_tools
 load_lib_tools(new_toolbox)
 new_toolbox.load_hidden_lib_tool('galaxy/datatypes/set_metadata_tool.xml')
 [new_toolbox.register_tool(tool) for tool in new_toolbox.data_manager_tools.values()]
 end = (time.time() - start)
 log.debug('Toolbox reload took %d seconds', end)
 app.reindex_tool_search(new_toolbox)
 return new_toolbox

def _get_new_toolbox ( app ) : from galaxy import tools from galaxy . tools . special_tools import load_lib_tools from galaxy . tools . toolbox . lineages . tool_shed import ToolVersionCache app . tool_version_cache = ToolVersionCache ( app ) tool_configs = app . config . tool_configs if ( app . config . migrated_tools_config not in tool_configs ) : tool_configs . append ( app . config . migrated_tools_config ) start = time . time ( ) new_toolbox = tools . ToolBox ( tool_configs , app . config . tool_path , app , app . toolbox . _tool_conf_watcher ) new_toolbox . data_manager_tools = app . toolbox . data_manager_tools load_lib_tools ( new_toolbox ) new_toolbox . load_hidden_lib_tool ( 'galaxy/datatypes/set_metadata_tool.xml' ) [ new_toolbox . register_tool ( tool ) for tool in new_toolbox . data_manager_tools . values ( ) ] end = ( time . time ( ) - start ) log . debug ( 'Toolbox reload took %d seconds' , end ) app . reindex_tool_search ( new_toolbox ) return new_toolbox
generate a new toolbox .