fix(parsers): remove non-RU proxy fallback
Some checks failed
CI/CD Pipeline / Run Tests (push) Successful in 2m17s
CI/CD Pipeline / Code Quality Checks (push) Failing after 2m46s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped

This commit is contained in:
2026-03-23 10:49:09 +01:00
parent 7d4c54636b
commit b8fa62f369
2 changed files with 4 additions and 7 deletions

View File

@@ -34,7 +34,6 @@ from apps.parsers.services import (
ProxyToolsSyncService,
)
from celery import shared_task
from django.conf import settings
from requests.adapters import BaseAdapter
logger = logging.getLogger(__name__)
@@ -50,8 +49,7 @@ def _resolve_proxies(proxies: list[str] | None) -> list[str] | None:
Приоритет:
1. Явно переданные в задачу `proxies`
2. Активные прокси из БД
3. `settings.PARSER_PROXIES` (например, из ENV)
2. Runtime-прокси из БД (с приоритетом Proxy-Tools RU)
"""
if proxies is not None:
return proxies
@@ -60,8 +58,7 @@ def _resolve_proxies(proxies: list[str] | None) -> list[str] | None:
if db_proxies:
return db_proxies
configured_proxies = getattr(settings, "PARSER_PROXIES", []) or []
return configured_proxies or None
return None
def _get_or_create_background_job(