Skip to content

Commit

Permalink
Send reload message after data bundle import is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Sep 3, 2023
1 parent 9a59546 commit 5684562
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/galaxy/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from galaxy.managers.tool_data import ToolDataImportManager
from galaxy.metadata.set_metadata import set_metadata_portable
from galaxy.model.scoped_session import galaxy_scoped_session
from galaxy.queue_worker import GalaxyQueueWorker
from galaxy.schema.tasks import (
ComputeDatasetHashTaskRequest,
GenerateHistoryContentDownload,
Expand Down Expand Up @@ -396,6 +397,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 5684562

Please sign in to comment.