# only include virtualenv if it's set/exists, otherwise this breaks conda-env'd Galaxy if not __arg_set('virtualenv', uwsgi_kwargs) and ( 'VIRTUAL_ENV' in os.environ or os.path.exists('.venv')): __add_arg(args, 'virtualenv', os.environ.get('VIRTUAL_ENV', '.venv')) # We always want to append client/src/assets as static-safe. __add_arg(args, 'static-safe', f'{os.getcwd()}/client/src/assets') # Do not let uwsgi remap stdin to /dev/null if galaxy is in debug mode galaxy_kwargs = load_app_properties(config_file=config_file, config_section='galaxy') if __arg_set('debug', galaxy_kwargs) and not __arg_set( 'honour-stdin', uwsgi_kwargs): __add_arg(args, 'honour-stdin', True) for arg in DEFAULT_ARGS['_all_'] + DEFAULT_ARGS[cliargs.app]: if not __arg_set(arg, uwsgi_kwargs): __add_arg(args, arg, defaults[arg]) print(' '.join(args)) ACTIONS = { "get_uwsgi_args": _get_uwsgi_args, } if __name__ == '__main__': main = main_factory(description=DESCRIPTION, actions=ACTIONS, default_action="get_uwsgi_args") main()
last_library = None log.debug('Beginning library walk') for library, dataset in _walk_libraries(args, model): if library != last_library: log.info('Library: %s', library.name) filename = object_store.get_filename(dataset) files_dir = dataset.get_extra_files_path() if (args.exists and object_store.exists(dataset)) or not args.exists: output.write('%s\n' % _path(filename, args)) elif args.exists: log.warning('Missing %s', filename) if files_dir and os.path.exists(files_dir): output.write('%s\n' % _path(files_dir, args)) last_library = library output.close() ACTIONS = { "get_library_dataset_paths": _get_library_dataset_paths, } if __name__ == '__main__': main = main_factory( description=DESCRIPTION, actions=ACTIONS, arguments=ARGUMENTS, default_action="get_library_dataset_paths" ) main()
'buffer-size': '16384', # https://github.com/galaxyproject/galaxy/issues/1530 'http': 'localhost:{port}'.format(port=DEFAULT_PORTS[cliargs.app]), 'static-map': ('/static/style={here}/static/style/blue'.format(here=os.getcwd()), '/static={here}/static'.format(here=os.getcwd())), 'die-on-term': True, 'enable-threads': True, 'hook-master-start': ('unix_signal:2 gracefully_kill_them_all', 'unix_signal:15 gracefully_kill_them_all'), 'py-call-osafterfork': True, } __add_config_file_arg(args, config_file, cliargs.app) if not __arg_set('module', uwsgi_kwargs): __add_arg(args, 'module', 'galaxy.webapps.{app}.buildapp:uwsgi_app()'.format(app=cliargs.app)) # only include virtualenv if it's set/exists, otherwise this breaks conda-env'd Galaxy if not __arg_set('virtualenv', uwsgi_kwargs) and ('VIRTUAL_ENV' in os.environ or os.path.exists('.venv')): __add_arg(args, 'virtualenv', os.environ.get('VIRTUAL_ENV', '.venv')) for arg in DEFAULT_ARGS['_all_'] + DEFAULT_ARGS[cliargs.app]: if not __arg_set(arg, uwsgi_kwargs): __add_arg(args, arg, defaults[arg]) print(' '.join(args)) ACTIONS = { "get_uwsgi_args": _get_uwsgi_args, } if __name__ == '__main__': main = main_factory(description=DESCRIPTION, actions=ACTIONS, default_action="get_uwsgi_args") main()
use_dependencies, tool_dependency_dir, use_cached_dependency_manager, tool_dependency_cache_dir, precache_dependencies = \ parse_dependency_options(kwargs, root, dependency_resolvers_config_file) if not use_dependencies: dependency_manager = NullDependencyManager() else: dependency_manager_kwds = { 'default_base_path': tool_dependency_dir, 'conf_file': dependency_resolvers_config_file, 'app_config': kwargs, } if use_cached_dependency_manager: dependency_manager_kwds[ 'tool_dependency_cache_dir'] = tool_dependency_cache_dir dependency_manager = CachedDependencyManager( **dependency_manager_kwds) else: dependency_manager = DependencyManager(**dependency_manager_kwds) return dependency_manager ACTIONS = { "init_if_needed": _init_if_needed, } if __name__ == '__main__': main = main_factory(description=DESCRIPTION, actions=ACTIONS) main()
kwargs.get('database_connection'), object_store=object_store) output = _open_output(args) last_library = None log.debug('Beginning library walk') for library, dataset in _walk_libraries(args, model): if library != last_library: log.info('Library: %s', library.name) filename = object_store.get_filename(dataset) files_dir = dataset.get_extra_files_path() if (args.exists and object_store.exists(dataset)) or not args.exists: output.write('%s\n' % _path(filename, args)) elif args.exists: log.warning('Missing %s', filename) if files_dir and os.path.exists(files_dir): output.write('%s\n' % _path(files_dir, args)) last_library = library output.close() ACTIONS = { "get_library_dataset_paths": _get_library_dataset_paths, } if __name__ == '__main__': main = main_factory(description=DESCRIPTION, actions=ACTIONS, arguments=ARGUMENTS, default_action="get_library_dataset_paths") main()