Skip to content

Commit

Permalink
Merge branch 'release_23.0' into release_23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Sep 5, 2023
2 parents f4d52d7 + cdba4a0 commit 5c38cae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,6 @@ def __init__(self, configure_logging=True, use_converters=True, use_display_appl

self._configure_tool_shed_registry()
self._register_singleton(tool_shed_registry.Registry, self.tool_shed_registry)
# Tool Data Tables
self._configure_tool_data_tables(from_shed_config=False)

def _configure_tool_shed_registry(self) -> None:
# Set up the tool sheds registry
Expand Down Expand Up @@ -638,6 +636,8 @@ def __init__(self, **kwargs) -> None:
)
self.api_keys_manager = self._register_singleton(ApiKeyManager)

# Tool Data Tables
self._configure_tool_data_tables(from_shed_config=False)
# Load dbkey / genome build manager
self._configure_genome_builds(data_table_name="__dbkeys__", load_old_style=True)

Expand Down
10 changes: 10 additions & 0 deletions lib/galaxy/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from galaxy.model.scoped_session import galaxy_scoped_session
from galaxy.objectstore import BaseObjectStore
from galaxy.objectstore.caching import check_caches
from galaxy.queue_worker import GalaxyQueueWorker
from galaxy.schema.tasks import (
ComputeDatasetHashTaskRequest,
GenerateHistoryContentDownload,
Expand All @@ -63,6 +64,11 @@
log = get_logger(__name__)


@lru_cache()
def setup_data_table_manager(app):
app._configure_tool_data_tables(from_shed_config=False)


@lru_cache()
def cached_create_tool_from_representation(app, raw_tool_source):
return create_tool_from_representation(
Expand Down Expand Up @@ -381,6 +387,7 @@ def compute_dataset_hash(

@galaxy_task(action="import a data bundle")
def import_data_bundle(
app: MinimalManagerApp,
hda_manager: HDAManager,
ldda_manager: LDDAManager,
tool_data_import_manager: ToolDataImportManager,
Expand All @@ -390,6 +397,7 @@ def import_data_bundle(
id: Optional[int] = None,
tool_data_file_path: Optional[str] = None,
):
setup_data_table_manager(app)
if src == "uri":
assert uri
tool_data_import_manager.import_data_bundle_by_uri(config, uri, tool_data_file_path=tool_data_file_path)
Expand All @@ -401,6 +409,8 @@ def import_data_bundle(
else:
dataset = ldda_manager.by_id(id)
tool_data_import_manager.import_data_bundle_by_dataset(config, dataset, tool_data_file_path=tool_data_file_path)
queue_worker = GalaxyQueueWorker(app)
queue_worker.send_control_task("reload_tool_data_tables")


@galaxy_task(action="pruning history audit table")
Expand Down
2 changes: 2 additions & 0 deletions test/integration/test_tool_data_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def _testbase_fields(self):
return show_response.json()["fields"]

def _testbeta_field_count(self) -> int:
# We need to wait for the reload message to reach the control message consumer
time.sleep(1)
return len(self._testbase_fields())


Expand Down

0 comments on commit 5c38cae

Please sign in to comment.