Skip to content

Commit da8adc3

Browse files
♻️ Update PROJECTS_INACTIVITY_INTERVAL env var format (#6797)
1 parent c85f825 commit da8adc3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.env-devel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ LOGIN_2FA_REQUIRED=0
333333
LOGIN_ACCOUNT_DELETION_RETENTION_DAYS=31
334334
LOGIN_REGISTRATION_CONFIRMATION_REQUIRED=0
335335
LOGIN_REGISTRATION_INVITATION_REQUIRED=0
336-
PROJECTS_INACTIVITY_INTERVAL=20
336+
PROJECTS_INACTIVITY_INTERVAL=00:00:20
337337
PROJECTS_TRASH_RETENTION_DAYS=7
338338
PROJECTS_MAX_COPY_SIZE_BYTES=30Gib
339339
PROJECTS_MAX_NUM_RUNNING_DYNAMIC_NODES=5

services/web/server/src/simcore_service_webserver/projects/settings.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from datetime import timedelta
1+
import datetime as dt
22

33
from aiohttp import web
4-
from common_library.pydantic_validators import validate_numeric_string_as_timedelta
54
from pydantic import ByteSize, Field, NonNegativeInt, TypeAdapter
65
from settings_library.base import BaseCustomSettings
76

@@ -19,14 +18,11 @@ class ProjectsSettings(BaseCustomSettings):
1918
description="defines the number of dynamic services in a project that can be started concurrently (a value of 0 will disable it)",
2019
)
2120

22-
PROJECTS_INACTIVITY_INTERVAL: timedelta = Field(
23-
default=timedelta(seconds=20),
21+
PROJECTS_INACTIVITY_INTERVAL: dt.timedelta = Field(
22+
default=dt.timedelta(seconds=20),
2423
description="interval after which services need to be idle in order to be considered inactive",
2524
)
2625

27-
_validate_projects_inactivity_interval = validate_numeric_string_as_timedelta(
28-
"PROJECTS_INACTIVITY_INTERVAL"
29-
)
3026
PROJECTS_TRASH_RETENTION_DAYS: NonNegativeInt = Field(
3127
default=7, description="Trashed items will be deleted after this time"
3228
)

0 commit comments

Comments
 (0)