From 75b43e9f23600403ffb17ad477b7844f8c1c40ec Mon Sep 17 00:00:00 2001 From: hatim dinia Date: Mon, 11 Mar 2024 14:47:20 +0100 Subject: [PATCH] feat(api-launcher): add default values for `time_limit` and `nb_cpu` --- antarest/launcher/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/antarest/launcher/model.py b/antarest/launcher/model.py index a8f856269d..60cfcb9971 100644 --- a/antarest/launcher/model.py +++ b/antarest/launcher/model.py @@ -23,15 +23,16 @@ class LauncherParametersDTO(BaseModel): # The reason is that it's stored in json format in database and deserialized using the latest class version # If compatibility is to be broken, an (alembic) data migration script should be added adequacy_patch: t.Optional[t.Dict[str, t.Any]] = None - nb_cpu: t.Optional[int] = None + nb_cpu: t.Optional[int] = 22 # Default value set to 22 cores post_processing: bool = False - time_limit: t.Optional[int] = None # 3600 ≤ time_limit < 864000 (10 days) + time_limit: t.Optional[int] = 240 * 3600 # Default value set to 240 hours (in seconds) xpansion: t.Union[XpansionParametersDTO, bool, None] = None xpansion_r_version: bool = False archive_output: bool = True auto_unzip: bool = True output_suffix: t.Optional[str] = None other_options: t.Optional[str] = None + # add extensions field here @classmethod