mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #22220 from pauldg/fix/distributed-objectstore-start-propagation
Propagate `start()` to backends in `DistributedObjectStore`
This commit is contained in:
@@ -1482,6 +1482,10 @@ class DistributedObjectStore(NestedObjectStore):
|
||||
as_dict["backends"] = backends
|
||||
return as_dict
|
||||
|
||||
def start(self):
|
||||
for backend in self.backends.values():
|
||||
backend.start()
|
||||
|
||||
def shutdown(self):
|
||||
"""Shut down. Kill the free space monitor if there is one."""
|
||||
super().shutdown()
|
||||
|
||||
@@ -6,7 +6,10 @@ from tempfile import (
|
||||
mkdtemp,
|
||||
mkstemp,
|
||||
)
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import (
|
||||
MagicMock,
|
||||
patch,
|
||||
)
|
||||
from uuid import uuid4
|
||||
|
||||
import pytest
|
||||
@@ -514,6 +517,15 @@ def test_distributed_store_with_cache_targets():
|
||||
assert len(object_store.cache_targets()) == 2
|
||||
|
||||
|
||||
def test_distributed_store_start_propagates_to_backends():
|
||||
with TestConfig(DISTRIBUTED_TEST_CONFIG) as (_, object_store):
|
||||
for backend in object_store.backends.values():
|
||||
backend.start = MagicMock()
|
||||
object_store.start()
|
||||
for backend in object_store.backends.values():
|
||||
backend.start.assert_called_once()
|
||||
|
||||
|
||||
HIERARCHICAL_MUST_HAVE_UNIFIED_QUOTA_SOURCE = """<?xml version="1.0"?>
|
||||
<object_store type="hierarchical" private="true">
|
||||
<backends>
|
||||
|
||||
Reference in New Issue
Block a user