fix: keep site parsing interval global

This commit is contained in:
Your Name
2026-08-10 21:32:46 +05:00
parent 5417737c08
commit 7889d4d376
8 changed files with 25 additions and 43 deletions
-8
View File
@@ -55,14 +55,6 @@ def validate_source_config(platform: str, config: dict[str, Any]) -> None:
raise ValueError("max_items должен быть целым числом") from exc
if not 1 <= max_items <= 100:
raise ValueError("max_items должен быть от 1 до 100")
try:
interval_minutes = int(config.get("interval_minutes", 30))
except (TypeError, ValueError) as exc:
raise ValueError("interval_minutes должен быть целым числом") from exc
if not 1 <= interval_minutes <= 10080:
raise ValueError("interval_minutes должен быть от 1 до 10080")
def _posted_at(value: Any) -> datetime:
try:
parsed = datetime.fromisoformat(str(value).replace("Z", "+00:00"))