Skip to content

Commit

Permalink
Progress on that object store init change.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Apr 9, 2024
1 parent 8f1218d commit a93db81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/model/store/build_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/model/unittest_utils/data_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion test/unit/data/test_model_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from galaxy.model import (
History,
HistoryDatasetAssociation,
setup_global_object_store_for_models,
User,
)
from galaxy.model.base import transaction
Expand Down Expand Up @@ -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="[email protected]", password="password")
h1 = History(name="HistoryCopyHistory1", user=u)
Expand Down

0 comments on commit a93db81

Please sign in to comment.