From ecdbc7e028fdbb3a633efbe4bf26be959c70dc01 Mon Sep 17 00:00:00 2001 From: trojvn Date: Thu, 6 Nov 2025 22:46:23 +0300 Subject: [PATCH] host --- main.py | 6 +++--- models.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4987ad9..05e202e 100644 --- a/main.py +++ b/main.py @@ -27,9 +27,9 @@ def move_ipa(from_path: str, to_path: str): class IPAToolClient(BaseAsyncClient): - def __init__(self, port: int): + def __init__(self, host: str, port: int): super().__init__( - f"http://65.109.64.76:{port}", + f"http://{host}:{port}", config=AsyncClientConfig(timeout=ClientTimeout(300)), ) @@ -198,7 +198,7 @@ async def main(json_data: dict): tasks = [] for udid, value in json_data.items(): info = UdidInfo(**value) - client = IPAToolClient(info.port) + client = IPAToolClient(info.host, info.port) task = _main(client, udid, info) tasks.append(task) await asyncio.gather(*tasks, return_exceptions=True) diff --git a/models.py b/models.py index 21b3e67..dfa1633 100644 --- a/models.py +++ b/models.py @@ -3,6 +3,7 @@ from dataclasses import dataclass @dataclass(frozen=True) class UdidInfo: + host: str port: int user: str pswd: str