File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
pytest-simcore/src/pytest_simcore
service-library/src/servicelib/long_running_tasks Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import pytest
2+ from pytest_mock import MockerFixture
23from servicelib .long_running_tasks import task
34from servicelib .long_running_tasks ._store .in_memory import InMemoryStore
45
56
67@pytest .fixture
7- def uese_in_memory_lonng_running_tasks_storage () -> None :
8- task . _StorageClass = InMemoryStore # pylint:disable=protected-access
8+ def uese_in_memory_lonng_running_tasks_storage (mocker : MockerFixture ) -> None :
9+ mocker . patch . object ( task , "RedisStore" , InMemoryStore )
Original file line number Diff line number Diff line change 3838
3939_CANCEL_TASKS_CHECK_INTERVAL : Final [datetime .timedelta ] = datetime .timedelta (seconds = 5 )
4040
41- _StorageClass : Final [type [BaseStore ]] = RedisStore
4241
4342RegisteredTaskName : TypeAlias = str
4443Namespace : TypeAlias = str
@@ -112,7 +111,7 @@ def __init__(
112111 namespace : Namespace ,
113112 ):
114113 # Task groups: Every taskname maps to multiple asyncio.Task within TrackedTask model
115- self ._tasks_data : BaseStore = _StorageClass (
114+ self ._tasks_data : BaseStore = RedisStore (
116115 redis_settings , namespace
117116 ) # type:ignore[call-arg]
118117 self ._created_tasks : dict [TaskId , asyncio .Task ] = {}
You can’t perform that action at this time.
0 commit comments