diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index 626aa1d489e..6670611637e 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -1207,14 +1207,10 @@ class GalaxyAppConfiguration(BaseAppConfiguration, CommonConfigurationMixin): _load_theme(self.themes_config_file, self.themes) def _process_celery_config(self): - if self.celery_conf: - result_backend = self.celery_conf.get("result_backend") - if result_backend: - # If the result_backend is the default SQLite database, we need to - # ensure that the correct data directory is used. - if "results.sqlite" in result_backend: - result_backend = f"db+sqlite:///{self._in_data_dir('results.sqlite')}?isolation_level=IMMEDIATE" - self.celery_conf["result_backend"] = result_backend + if self.celery_conf and self.celery_conf.get("result_backend") is None: + # If the result_backend is not set, use a SQLite database in the data directory + result_backend = f"db+sqlite:///{self._in_data_dir('results.sqlite')}?isolation_level=IMMEDIATE" + self.celery_conf["result_backend"] = result_backend def _check_database_connection_strings(self): """ diff --git a/lib/galaxy/config/schemas/config_schema.yml b/lib/galaxy/config/schemas/config_schema.yml index 4fffa48b62d..13051a2098e 100644 --- a/lib/galaxy/config/schemas/config_schema.yml +++ b/lib/galaxy/config/schemas/config_schema.yml @@ -3772,7 +3772,6 @@ mapping: type: any required: false default: - result_backend: db+sqlite:///./database/results.sqlite?isolation_level=IMMEDIATE task_routes: 'galaxy.fetch_data': 'galaxy.external' 'galaxy.set_job_metadata': 'galaxy.external' @@ -3783,7 +3782,8 @@ mapping: of the task defined in the galaxy.celery.tasks module. The `broker_url` option, if unset, defaults to the value of `amqp_internal_connection`. - The `result_backend` option must be set if the `enable_celery_tasks` option is set. + The `result_backend` option, if unset, defaults to an SQLite database at '/results.sqlite' + for storing task results. The galaxy.fetch_data task can be disabled by setting its route to "disabled": `galaxy.fetch_data: disabled`. (Other tasks cannot be disabled on a per-task basis at this time.)