File tree 2 files changed +15
-0
lines changed
src/simcore_service_director_v2/utils 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 26
26
RunningState .NOT_STARTED ,
27
27
RunningState .WAITING_FOR_CLUSTER ,
28
28
): RunningState .WAITING_FOR_CLUSTER ,
29
+ # if there are tasks waiting for resources and nothing is running/pending, then the pipeline is also waiting for resources
30
+ (
31
+ RunningState .PUBLISHED ,
32
+ RunningState .NOT_STARTED ,
33
+ RunningState .WAITING_FOR_RESOURCES ,
34
+ ): RunningState .WAITING_FOR_RESOURCES ,
29
35
# if there are PENDING states that means the pipeline was published and is awaiting sidecars
30
36
(
31
37
RunningState .PENDING ,
Original file line number Diff line number Diff line change @@ -257,6 +257,15 @@ def fake_task(fake_task_file: Path) -> CompTaskAtDB:
257
257
RunningState .WAITING_FOR_CLUSTER ,
258
258
id = "published and waiting for cluster = waiting for cluster" ,
259
259
),
260
+ pytest .param (
261
+ [
262
+ (RunningState .WAITING_FOR_RESOURCES ),
263
+ (RunningState .PUBLISHED ),
264
+ (RunningState .PUBLISHED ),
265
+ ],
266
+ RunningState .WAITING_FOR_RESOURCES ,
267
+ id = "published and waiting for resources = waiting for resources" ,
268
+ ),
260
269
],
261
270
)
262
271
def test_get_pipeline_state_from_task_states (
You can’t perform that action at this time.
0 commit comments