diff --git a/lib/galaxy/model/store/build_objects.py b/lib/galaxy/model/store/build_objects.py index a0390d3d2f31..6d4c73dc8c1e 100644 --- a/lib/galaxy/model/store/build_objects.py +++ b/lib/galaxy/model/store/build_objects.py @@ -90,8 +90,8 @@ def main(argv=None): galaxy.model.set_datatypes_registry(example_datatype_registry_for_sample()) from galaxy.model import mapping - mapping.init("/tmp", "sqlite:///:memory:", create_tables=True, object_store=object_store) - + mapping.init("/tmp", "sqlite:///:memory:", create_tables=True) + galaxy.model.setup_global_object_store_for_models(object_store) with open(args.objects) as f: targets = yaml.safe_load(f) if not isinstance(targets, list): diff --git a/lib/galaxy/model/unittest_utils/data_app.py b/lib/galaxy/model/unittest_utils/data_app.py index 75307163ae3d..fa92af3190a3 100644 --- a/lib/galaxy/model/unittest_utils/data_app.py +++ b/lib/galaxy/model/unittest_utils/data_app.py @@ -96,7 +96,8 @@ def __init__(self, config: Optional[GalaxyDataTestConfig] = None, **kwd): self.config = config self.security = config.security self.object_store = objectstore.build_object_store_from_config(self.config) - self.model = init("/tmp", self.config.database_connection, create_tables=True, object_store=self.object_store) + self.model = init("/tmp", self.config.database_connection, create_tables=True) + model.setup_global_object_store_for_models(self.object_store) self.security_agent = self.model.security_agent self.tag_handler = GalaxyTagHandler(self.model.session) self.init_datatypes() diff --git a/test/unit/data/test_model_copy.py b/test/unit/data/test_model_copy.py index 6487442f69ca..b159953417a0 100644 --- a/test/unit/data/test_model_copy.py +++ b/test/unit/data/test_model_copy.py @@ -11,6 +11,7 @@ from galaxy.model import ( History, HistoryDatasetAssociation, + setup_global_object_store_for_models, User, ) from galaxy.model.base import transaction @@ -142,10 +143,10 @@ def _setup_mapping_and_user(): "/tmp", "sqlite:///:memory:", create_tables=True, - object_store=object_store, slow_query_log_threshold=SLOW_QUERY_LOG_THRESHOLD, thread_local_log=THREAD_LOCAL_LOG, ) + setup_global_object_store_for_models(object_store) u = User(email="historycopy@example.com", password="password") h1 = History(name="HistoryCopyHistory1", user=u)