Skip to content

Commit e034603

Browse files
committed
update
1 parent 204d3df commit e034603

File tree

1 file changed

+20
-10
lines changed
  • services/web/server/src/simcore_service_webserver/garbage_collector

1 file changed

+20
-10
lines changed

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Annotated
2+
13
from aiohttp import web
24
from pydantic import Field, PositiveInt
35
from servicelib.aiohttp.application_keys import APP_SETTINGS_KEY
@@ -13,20 +15,28 @@
1315

1416

1517
class GarbageCollectorSettings(BaseCustomSettings):
16-
GARBAGE_COLLECTOR_INTERVAL_S: PositiveInt = Field(
17-
30 * _SEC,
18-
description="Waiting time between consecutive runs of the garbage-colector",
18+
GARBAGE_COLLECTOR_INTERVAL_S: Annotated[
19+
PositiveInt,
20+
Field(
21+
description="Waiting time between consecutive runs of the garbage-colector"
22+
),
23+
] = (
24+
30 * _SEC
1925
)
2026

21-
GARBAGE_COLLECTOR_EXPIRED_USERS_CHECK_INTERVAL_S: PositiveInt = Field(
22-
1 * _HOUR,
23-
description="Time period between checks of expiration dates for trial users",
27+
GARBAGE_COLLECTOR_EXPIRED_USERS_CHECK_INTERVAL_S: Annotated[
28+
PositiveInt,
29+
Field(
30+
description="Time period between checks of expiration dates for trial users"
31+
),
32+
] = (
33+
1 * _HOUR
2434
)
2535

26-
GARBAGE_COLLECTOR_PRUNE_APIKEYS_INTERVAL_S: PositiveInt = Field(
27-
_HOUR,
28-
description="Wait time between periodic pruning of expired API keys",
29-
)
36+
GARBAGE_COLLECTOR_PRUNE_APIKEYS_INTERVAL_S: Annotated[
37+
PositiveInt,
38+
Field(description="Wait time between periodic pruning of expired API keys"),
39+
] = _HOUR
3040

3141

3242
def get_plugin_settings(app: web.Application) -> GarbageCollectorSettings:

0 commit comments

Comments
 (0)