diff --git a/.env-devel b/.env-devel index 0b606a2426db..32facad83573 100644 --- a/.env-devel +++ b/.env-devel @@ -333,7 +333,7 @@ LOGIN_2FA_REQUIRED=0 LOGIN_ACCOUNT_DELETION_RETENTION_DAYS=31 LOGIN_REGISTRATION_CONFIRMATION_REQUIRED=0 LOGIN_REGISTRATION_INVITATION_REQUIRED=0 -PROJECTS_INACTIVITY_INTERVAL=20 +PROJECTS_INACTIVITY_INTERVAL=00:00:20 PROJECTS_TRASH_RETENTION_DAYS=7 PROJECTS_MAX_COPY_SIZE_BYTES=30Gib PROJECTS_MAX_NUM_RUNNING_DYNAMIC_NODES=5 diff --git a/services/web/server/src/simcore_service_webserver/projects/settings.py b/services/web/server/src/simcore_service_webserver/projects/settings.py index 7490c87ff552..57c03f915efe 100644 --- a/services/web/server/src/simcore_service_webserver/projects/settings.py +++ b/services/web/server/src/simcore_service_webserver/projects/settings.py @@ -1,7 +1,6 @@ -from datetime import timedelta +import datetime as dt from aiohttp import web -from common_library.pydantic_validators import validate_numeric_string_as_timedelta from pydantic import ByteSize, Field, NonNegativeInt, TypeAdapter from settings_library.base import BaseCustomSettings @@ -19,14 +18,11 @@ class ProjectsSettings(BaseCustomSettings): description="defines the number of dynamic services in a project that can be started concurrently (a value of 0 will disable it)", ) - PROJECTS_INACTIVITY_INTERVAL: timedelta = Field( - default=timedelta(seconds=20), + PROJECTS_INACTIVITY_INTERVAL: dt.timedelta = Field( + default=dt.timedelta(seconds=20), description="interval after which services need to be idle in order to be considered inactive", ) - _validate_projects_inactivity_interval = validate_numeric_string_as_timedelta( - "PROJECTS_INACTIVITY_INTERVAL" - ) PROJECTS_TRASH_RETENTION_DAYS: NonNegativeInt = Field( default=7, description="Trashed items will be deleted after this time" )