Skip to content

Commit

Permalink
Merge pull request #18819 from mvdbeek/fix_celery_config_when_galaxy_…
Browse files Browse the repository at this point in the history
…started_via_main_py

[24.1] Fix wrong celery_app config on job and workflow handlers
  • Loading branch information
mvdbeek authored Sep 17, 2024
2 parents d17d742 + ec48f50 commit a567944
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/celery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
7 changes: 7 additions & 0 deletions scripts/galaxy_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a567944

Please sign in to comment.