Skip to content

Commit 43f678f

Browse files
GitHKAndrei Neagu
andauthored
♻️ Using iso timedelta in settings (#6656)
Co-authored-by: Andrei Neagu <[email protected]>
1 parent cd20a2c commit 43f678f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.env-devel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ COMPUTATIONAL_BACKEND_DEFAULT_FILE_LINK_TYPE=PRESIGNED
8888
COMPUTATIONAL_BACKEND_ON_DEMAND_CLUSTERS_FILE_LINK_TYPE=PRESIGNED
8989
DIRECTOR_V2_DEV_FEATURES_ENABLED=0
9090
DIRECTOR_V2_DYNAMIC_SCHEDULER_CLOSE_SERVICES_VIA_FRONTEND_WHEN_CREDITS_LIMIT_REACHED=1
91-
DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=0
91+
DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=PT0S
9292
DIRECTOR_V2_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS='{}'
9393
DIRECTOR_V2_HOST=director-v2
9494
DIRECTOR_V2_LOGLEVEL=INFO
@@ -108,7 +108,7 @@ DYNAMIC_SIDECAR_API_SAVE_RESTORE_STATE_TIMEOUT=3600
108108
# DIRECTOR_V2 ----
109109
DYNAMIC_SCHEDULER_LOGLEVEL=DEBUG
110110
DYNAMIC_SCHEDULER_PROFILING=1
111-
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=3600
111+
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=PT1H
112112

113113
FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]", "affiliation": "unknown"}}'
114114

services/agent/src/simcore_service_agent/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
5353
AGENT_VOLUMES_CLEANUP_INTERVAL: timedelta = Field(
5454
timedelta(minutes=1), description="interval for running volumes removal"
5555
)
56-
AGENT_VOLUMES_CLENUP_BOOK_KEEPING_INTERVAL: timedelta = Field(
56+
AGENT_VOLUMES_CLEANUP_BOOK_KEEPING_INTERVAL: timedelta = Field(
5757
timedelta(minutes=1),
5858
description=(
5959
"interval at which to scan for unsued volumes and keep track since "
6060
"they were detected as being unused"
6161
),
6262
)
63-
AGENT_VOLUMES_CLENUP_REMOVE_VOLUMES_INACTIVE_FOR: timedelta = Field(
63+
AGENT_VOLUMES_CLEANUP_REMOVE_VOLUMES_INACTIVE_FOR: timedelta = Field(
6464
timedelta(minutes=65),
6565
description=(
6666
"if a volume is unused for more than this interval it can be removed. "

services/agent/src/simcore_service_agent/services/volumes_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ async def _on_startup() -> None:
174174

175175
volumes_manager = VolumesManager(
176176
app=app,
177-
book_keeping_interval=settings.AGENT_VOLUMES_CLENUP_BOOK_KEEPING_INTERVAL,
177+
book_keeping_interval=settings.AGENT_VOLUMES_CLEANUP_BOOK_KEEPING_INTERVAL,
178178
volume_cleanup_interval=settings.AGENT_VOLUMES_CLEANUP_INTERVAL,
179-
remove_volumes_inactive_for=settings.AGENT_VOLUMES_CLENUP_REMOVE_VOLUMES_INACTIVE_FOR.total_seconds(),
179+
remove_volumes_inactive_for=settings.AGENT_VOLUMES_CLEANUP_REMOVE_VOLUMES_INACTIVE_FOR.total_seconds(),
180180
)
181181
volumes_manager.set_to_app_state(app)
182182
await volumes_manager.setup()

0 commit comments

Comments
 (0)