fix(tradein-scraper-kit): продуктовый override domclick тоже получает region_code
All checks were successful
CI Trade-In / backend-tests (pull_request) Successful in 4m58s
CI Trade-In / changes (pull_request) Successful in 10s
CI / changes (pull_request) Successful in 13s
CI Trade-In / browser-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
All checks were successful
CI Trade-In / backend-tests (pull_request) Successful in 4m58s
CI Trade-In / changes (pull_request) Successful in 10s
CI / changes (pull_request) Successful in 13s
CI Trade-In / browser-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
app/services/product_handlers.py::_job_domclick_city_sweep — app-side override kit-native джобы (issue 3264, инъекция куки Sber ID для обхода QRATOR PoW). Домклик по расписанию идёт именно через этот override, а не через kit-native _job_domclick_city_sweep напрямую (build_registry отдаёт последнее слово продукту) — предыдущий коммит добавил region_code только в kit-джобу, оставив override с прежним поведением. CI поймал дрейф штатным тестом test_product_override_matches_kit_native_call_except_cookies: он сравнивает kwargs обеих джоб и требует расхождения ровно в cookies. Валидацию не дублирую — импортирую _resolve_region_code из scraper_kit. orchestration.scheduler (как уже сделано для _pick_resume/_defer_next_run_at в этом же файле), чтобы список разрешённых регионов остался в одном месте. Другие дубли джоб в product_handlers.py, зовущие run_*_sweep/run_*_full_load, не найдены (grep по обоим паттернам — только domclick).
This commit is contained in:
parent
9eb10a0f81
commit
d7f46316e3
1 changed files with 4 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ from scraper_kit.orchestration.scheduler import (
|
|||
from scraper_kit.orchestration.scheduler import (
|
||||
_pick_resume as kit_pick_resume,
|
||||
)
|
||||
from scraper_kit.orchestration.scheduler import (
|
||||
_resolve_region_code as kit_resolve_region_code,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from scraper_kit.orchestration.scheduler import SchedulerContext
|
||||
|
|
@ -515,6 +518,7 @@ async def _job_domclick_city_sweep(
|
|||
rooms=params.get("rooms"),
|
||||
pages=int(params.get("pages_per_anchor", 5)),
|
||||
request_delay_sec=float(params.get("request_delay_sec", 6.0)),
|
||||
region_code=kit_resolve_region_code(params),
|
||||
resume_run_id=kit_pick_resume(db, run_id),
|
||||
cookies=cookies,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue