deploy: VPS bootstrap (WSL2+Docker) + lightweight compose overlay for 4GB RAM + harden

This commit is contained in:
qananasikq
2026-04-18 00:54:48 +03:00
parent a8c5f8aa41
commit 39c8e0fc9f
11 changed files with 442 additions and 53 deletions

View File

@@ -219,6 +219,8 @@ class CeleryConfig:
task_time_limit: int = _env_int("CELERY_TASK_TIME_LIMIT", 3600)
worker_concurrency: int = _env_int("CELERY_WORKER_CONCURRENCY", 4)
worker_max_tasks_per_child: int = _env_int("CELERY_WORKER_MAX_TASKS_PER_CHILD", 5)
# KB; worker перезапустит child при превышении (защита от утечек Chromium/Playwright).
worker_max_memory_per_child_kb: int = _env_int("CELERY_WORKER_MAX_MEMORY_PER_CHILD_KB", 500_000)
broker_visibility_timeout: int = _env_int("CELERY_BROKER_VISIBILITY_TIMEOUT", 7200)
beat_sync_interval_minutes: int = _env_int("CELERY_BEAT_SYNC_INTERVAL_MINUTES", 60)
beat_sync_limit: int | None = _env_int("CELERY_BEAT_SYNC_LIMIT", 0) or None