Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy package

Galaxy root package – this is a namespace package.

Subpackages

Submodules

galaxy.app module

class galaxy.app.UniverseApplication(**kwargs)[source]

Bases: galaxy.config.ConfiguresGalaxyMixin

Encapsulates the state of a Universe application

__init__(**kwargs)[source]
shutdown()[source]
configure_fluent_log()[source]
is_job_handler
class galaxy.app.StatsdStructuredExecutionTimer(galaxy_statsd_client, *args, **kwds)[source]

Bases: galaxy.util.StructuredExecutionTimer

__init__(galaxy_statsd_client, *args, **kwds)[source]
to_str(**kwd)[source]
class galaxy.app.ExecutionTimerFactory(config)[source]

Bases: object

__init__(config)[source]
get_timer(*args, **kwd)[source]

galaxy.config_watchers module

class galaxy.config_watchers.ConfigWatchers(app)[source]

Bases: object

Contains ToolConfWatcher, ToolWatcher and ToolDataWatcher objects.

__init__(app)[source]
watchers
change_state(active)[source]
start()[source]
shutdown()[source]
update_watch_data_table_paths()[source]
data_manager_configs
tool_data_paths
tool_config_paths
job_rules_paths

galaxy.main module

Entry point for starting Galaxy without starting as part of a web server.

Example Usage: Start a job/workflow handler without a web server and with a given name using.

galaxy-main –server-name handler0

Start as a daemon with (requires daemonized - install with ‘pip install daemonize’):

galaxy-main -d –daemon-log-file=handler0-daemon.log –pid-file handler0.pid –server-name handler0

In daemon mode logging of Galaxy (as opposed to this script) is configured via a loggers section in Galaxy’s ini file - this can be overridden with sensible defaults logging to a single file with the following:

galaxy-main -d –server-name handler0 –daemon-log-file=handler0-daemon.log –pid-file handler0.pid –log-file handler0.log

This can also be used to start Galaxy as a uWSGI mule, e.g. for job handling:

uwsgi … –py-call-osafterfork –mule=lib/galaxy/main.py –mule=lib/galaxy/main.py –farm=job-handlers:1,2

The –py-call-osafterfork allows for proper shutdown on SIGTERM/SIGINT.

galaxy.main.load_galaxy_app(config_builder, config_env=False, log=None, attach_to_pools=None, **kwds)[source]
galaxy.main.handle_signal(signum, frame)[source]
galaxy.main.register_signals()[source]
galaxy.main.app_loop(args, log)[source]
galaxy.main.absolute_config_path(path, galaxy_root)[source]
galaxy.main.find_config(supplied_config, galaxy_root)[source]
class galaxy.main.GalaxyConfigBuilder(args=None, **kwds)[source]

Bases: object

Generate paste-like configuration from supplied command-line arguments.

__init__(args=None, **kwds)[source]
classmethod populate_options(arg_parser)[source]
config_is_ini
app_kwds()[source]
global_conf()[source]
setup_logging()[source]
galaxy.main.main()[source]

galaxy.queue_worker module

Galaxy control queue and worker. This is used to handle ‘app’ control like reloading the toolbox, etc., across multiple processes.

galaxy.queue_worker.send_local_control_task(app, task, get_response=False, kwargs=None)[source]

This sends a message to the process-local control worker, which is useful for one-time asynchronous tasks like recalculating user disk usage.

galaxy.queue_worker.send_control_task(app, task, noop_self=False, get_response=False, routing_key='control.*', kwargs=None)[source]

This sends a control task out to all processes, useful for things like reloading a data table, which needs to happen individually in all processes. Set noop_self to True to not run task for current process. Set get_response to True to wait for and return the task results as a list.

class galaxy.queue_worker.ControlTask(queue_worker)[source]

Bases: object

__init__(queue_worker)[source]
connection
control_queues
exchange
declare_queues
on_response(message)[source]
send_task(payload, routing_key, local=False, get_response=False, timeout=10)[source]
galaxy.queue_worker.reconfigure_watcher(app, **kwargs)[source]
galaxy.queue_worker.create_panel_section(app, **kwargs)[source]

Updates in memory toolbox dictionary.

galaxy.queue_worker.reload_tool(app, **kwargs)[source]
galaxy.queue_worker.reload_toolbox(app, save_integrated_tool_panel=True, **kwargs)[source]
galaxy.queue_worker.reload_data_managers(app, **kwargs)[source]
galaxy.queue_worker.reload_display_application(app, **kwargs)[source]
galaxy.queue_worker.reload_sanitize_whitelist(app)[source]
galaxy.queue_worker.recalculate_user_disk_usage(app, **kwargs)[source]
galaxy.queue_worker.reload_tool_data_tables(app, **kwargs)[source]
galaxy.queue_worker.rebuild_toolbox_search_index(app, **kwargs)[source]
galaxy.queue_worker.reload_job_rules(app, **kwargs)[source]
galaxy.queue_worker.reload_core_config(app, **kwargs)[source]
galaxy.queue_worker.reload_tour(app, **kwargs)[source]
galaxy.queue_worker.job_rule_modules(app)[source]
galaxy.queue_worker.admin_job_lock(app, **kwargs)[source]
class galaxy.queue_worker.GalaxyQueueWorker(app, task_mapping=None)[source]

Bases: kombu.mixins.ConsumerProducerMixin, threading.Thread

This is a flexible worker for galaxy’s queues. Each process, web or handler, will have one of these used for dispatching so called ‘control’ tasks.

__init__(app, task_mapping=None)[source]
send_control_task(task, noop_self=False, get_response=False, routing_key='control.*', kwargs=None)[source]
send_local_control_task(task, get_response=False, kwargs=None)[source]
declare_queues
bind_and_start()[source]
get_consumers(Consumer, channel)[source]
process_task(body, message)[source]
shutdown()[source]

galaxy.queues module

All message queues used by Galaxy

galaxy.queues.all_control_queues_for_declare(application_stack)[source]

For in-memory routing (used by sqlalchemy-based transports), we need to be able to build the entire routing table in producers.

galaxy.queues.control_queues_from_config(config)[source]

Returns a Queue instance with the correct name and routing key for this galaxy process’s config

galaxy.queues.connection_from_config(config)[source]

galaxy.version module