Skip to content

Commit 4653951

Browse files
add GARBAGE_COLLECTOR_PRUNE_DOCUMENTS_INTERVAL_S
1 parent 32b0db0 commit 4653951

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def setup_garbage_collector(app: web.Application) -> None:
6767
_tasks_trash.create_background_task_to_prune_trash(wait_period_s)
6868
)
6969

70-
wait_period_s = 600
70+
wait_period_s = settings.GARBAGE_COLLECTOR_PRUNE_DOCUMENTS_INTERVAL_S
7171
app.cleanup_ctx.append(
7272
_tasks_documents.create_background_task_to_prune_documents(wait_period_s)
7373
)

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ class GarbageCollectorSettings(BaseCustomSettings):
3838
Field(description="Wait time between periodic pruning of expired API keys"),
3939
] = _HOUR
4040

41+
GARBAGE_COLLECTOR_PRUNE_DOCUMENTS_INTERVAL_S: Annotated[
42+
PositiveInt,
43+
Field(description="Wait time between periodic pruning of documents"),
44+
] = (
45+
30 * _MINUTE
46+
)
47+
4148

4249
def get_plugin_settings(app: web.Application) -> GarbageCollectorSettings:
4350
settings = app[APP_SETTINGS_KEY].WEBSERVER_GARBAGE_COLLECTOR

0 commit comments

Comments
 (0)