feat: harden sync flow, proxy bridge, and data normalization
This commit is contained in:
@@ -126,6 +126,7 @@ class Settings:
|
||||
log_file: str | None = os.getenv("IAAI_LOG_FILE") or None
|
||||
enable_trace_id_logs: bool = os.getenv("IAAI_ENABLE_TRACE_ID_LOGS", "true").strip().lower() in {"1", "true", "yes", "on"}
|
||||
scheduler_interval_minutes: int = int(os.getenv("IAAI_SCHEDULER_INTERVAL_MINUTES", "60"))
|
||||
sync_only_new: bool = os.getenv("IAAI_SYNC_ONLY_NEW", "true").strip().lower() in {"1", "true", "yes", "on"}
|
||||
fingerprint: FingerprintConfig = field(default_factory=FingerprintConfig)
|
||||
gentle: GentleModeConfig = field(default_factory=GentleModeConfig)
|
||||
pace: HumanPaceConfig = field(default_factory=HumanPaceConfig)
|
||||
|
||||
@@ -7,7 +7,9 @@ from typing import Any, Iterable
|
||||
|
||||
|
||||
def save_to_json(data: Any, filename: str | Path) -> None:
|
||||
Path(filename).write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
path = Path(filename)
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
|
||||
|
||||
def short_sleep(a: float = 0.10, b: float = 0.35) -> None:
|
||||
|
||||
Reference in New Issue
Block a user