Skip to content

Commit 169d99e

Browse files
Limit the number of accepted jobs in the api-server's POST /v0/functions/{function_id}:map endpoint (#7801)
1 parent 071b9ec commit 169d99e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/models-library/src/models_library/functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ class FunctionClass(str, Enum):
7575
# see here https://github.com/ITISFoundation/osparc-simcore/issues/7659
7676
FunctionInputs: TypeAlias = dict[str, Any] | None
7777

78-
FunctionInputsList: TypeAlias = list[FunctionInputs]
78+
FunctionInputsList: TypeAlias = Annotated[
79+
list[FunctionInputs],
80+
Field(max_length=50),
81+
]
7982

8083
FunctionOutputs: TypeAlias = dict[str, Any] | None
8184

services/api-server/openapi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7699,6 +7699,7 @@
76997699
}
77007700
]
77017701
},
7702+
"maxItems": 50,
77027703
"title": "Function Inputs List"
77037704
}
77047705
}

tests/performance/locustfiles/functions/map_test_sleeper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# dependencies = [
44
# "httpx",
55
# "matplotlib",
6-
# "osparc>=0.8.3.post0.dev26",
6+
# "osparc>0.8.3.post0.dev26",
77
# "tenacity",
88
# "tqdm",
99
# ]

0 commit comments

Comments
 (0)