3131from simcore_service_director_v2 .modules .comp_scheduler ._manager import (
3232 SCHEDULER_INTERVAL ,
3333 run_new_pipeline ,
34- schedule_pipelines ,
34+ schedule_all_pipelines ,
3535 stop_pipeline ,
3636)
3737from simcore_service_director_v2 .modules .comp_scheduler ._models import (
@@ -66,25 +66,25 @@ def with_fast_scheduling(mocker: MockerFixture) -> None:
6666
6767
6868@pytest .fixture
69- def mocked_schedule_pipelines (mocker : MockerFixture ) -> mock .Mock :
69+ def mocked_schedule_all_pipelines (mocker : MockerFixture ) -> mock .Mock :
7070 return mocker .patch (
71- "simcore_service_director_v2.modules.comp_scheduler._manager.schedule_pipelines " ,
71+ "simcore_service_director_v2.modules.comp_scheduler._manager.schedule_all_pipelines " ,
7272 autospec = True ,
7373 )
7474
7575
7676async def test_manager_starts_and_auto_schedules_pipelines (
7777 with_fast_scheduling : None ,
7878 with_disabled_scheduler_worker : mock .Mock ,
79- mocked_schedule_pipelines : mock .Mock ,
79+ mocked_schedule_all_pipelines : mock .Mock ,
8080 initialized_app : FastAPI ,
8181 sqlalchemy_async_engine : AsyncEngine ,
8282):
8383 await assert_comp_runs_empty (sqlalchemy_async_engine )
84- mocked_schedule_pipelines .assert_called ()
84+ mocked_schedule_all_pipelines .assert_called ()
8585
8686
87- async def test_schedule_pipelines_empty_db (
87+ async def test_schedule_all_pipelines_empty_db (
8888 with_disabled_auto_scheduling : mock .Mock ,
8989 with_disabled_scheduler_worker : mock .Mock ,
9090 initialized_app : FastAPI ,
@@ -93,7 +93,7 @@ async def test_schedule_pipelines_empty_db(
9393):
9494 await assert_comp_runs_empty (sqlalchemy_async_engine )
9595
96- await schedule_pipelines (initialized_app )
96+ await schedule_all_pipelines (initialized_app )
9797
9898 # check nothing was distributed
9999 scheduler_rabbit_client_parser .assert_not_called ()
@@ -102,7 +102,7 @@ async def test_schedule_pipelines_empty_db(
102102 await assert_comp_runs_empty (sqlalchemy_async_engine )
103103
104104
105- async def test_schedule_pipelines_concurently_runs_exclusively_and_raises (
105+ async def test_schedule_all_pipelines_concurently_runs_exclusively_and_raises (
106106 with_disabled_auto_scheduling : mock .Mock ,
107107 initialized_app : FastAPI ,
108108 mocker : MockerFixture ,
@@ -124,7 +124,7 @@ async def slow_limited_gather(*args, **kwargs):
124124 )
125125
126126 results = await asyncio .gather (
127- * (schedule_pipelines (initialized_app ) for _ in range (CONCURRENCY )),
127+ * (schedule_all_pipelines (initialized_app ) for _ in range (CONCURRENCY )),
128128 return_exceptions = True ,
129129 )
130130
@@ -135,7 +135,7 @@ async def slow_limited_gather(*args, **kwargs):
135135 mock_function .assert_called_once ()
136136
137137
138- async def test_schedule_pipelines (
138+ async def test_schedule_all_pipelines (
139139 with_disabled_auto_scheduling : mock .Mock ,
140140 with_disabled_scheduler_worker : mock .Mock ,
141141 initialized_app : FastAPI ,
@@ -178,7 +178,7 @@ async def test_schedule_pipelines(
178178 start_modified_time = comp_run .modified
179179
180180 # this will now not schedule the pipeline since it was last scheduled
181- await schedule_pipelines (initialized_app )
181+ await schedule_all_pipelines (initialized_app )
182182 scheduler_rabbit_client_parser .assert_not_called ()
183183 comp_runs = await assert_comp_runs (sqlalchemy_async_engine , expected_total = 1 )
184184 comp_run = comp_runs [0 ]
@@ -188,7 +188,7 @@ async def test_schedule_pipelines(
188188
189189 # this will now schedule the pipeline since the time passed
190190 await asyncio .sleep (SCHEDULER_INTERVAL .total_seconds () + 1 )
191- await schedule_pipelines (initialized_app )
191+ await schedule_all_pipelines (initialized_app )
192192 scheduler_rabbit_client_parser .assert_called_once_with (
193193 SchedulePipelineRabbitMessage (
194194 user_id = published_project .project .prj_owner ,
@@ -211,7 +211,7 @@ async def test_schedule_pipelines(
211211 user_id = published_project .project .prj_owner ,
212212 project_id = published_project .project .uuid ,
213213 )
214- await schedule_pipelines (initialized_app )
214+ await schedule_all_pipelines (initialized_app )
215215 scheduler_rabbit_client_parser .assert_called_once_with (
216216 SchedulePipelineRabbitMessage (
217217 user_id = published_project .project .prj_owner ,
0 commit comments