diff --git a/lib/galaxy/celery/__init__.py b/lib/galaxy/celery/__init__.py index 11432481529c..120df3c28906 100644 --- a/lib/galaxy/celery/__init__.py +++ b/lib/galaxy/celery/__init__.py @@ -220,7 +220,7 @@ def config_celery_app(config, celery_app): if config.celery_conf: celery_app.conf.update(config.celery_conf) # Handle special cases - if not celery_app.conf.broker_url: + if not config.celery_conf.get("broker_url"): celery_app.conf.broker_url = config.amqp_internal_connection diff --git a/scripts/galaxy_main.py b/scripts/galaxy_main.py index 02ef73928604..85d6b954dbb7 100755 --- a/scripts/galaxy_main.py +++ b/scripts/galaxy_main.py @@ -87,8 +87,15 @@ def load_galaxy_app(config_builder, config_env=False, log=None, attach_to_pools= kwds = config_builder.app_kwds() kwds = load_app_properties(**kwds) from galaxy.app import UniverseApplication + from galaxy.celery import ( + celery_app, + config_celery_app, + ) app = UniverseApplication(global_conf=config_builder.global_conf(), attach_to_pools=attach_to_pools, **kwds) + # Update celery app, which might not have taken into account the config file if set via the `-c` argument. + config_celery_app(app.config, celery_app) + app.database_heartbeat.start() app.application_stack.log_startup() return app