Do not set default value for result_backend

This commit is contained in:
davelopez
2024-04-10 17:12:37 +02:00
parent 4ec8cef337
commit f10ba4a37b
2 changed files with 6 additions and 10 deletions
+4 -8
View File
@@ -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):
"""
+2 -2
View File
@@ -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 '<data_dir>/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.)