From ef79c45d7872f6ad5df1ce4270433ac9c672bfdf Mon Sep 17 00:00:00 2001 From: liujianjiang Date: Fri, 9 Jan 2026 18:31:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gunicorn_conf.py | 4 ++-- public_function/deal_all_task.py | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gunicorn_conf.py b/gunicorn_conf.py index f5f7389..3eeba9e 100644 --- a/gunicorn_conf.py +++ b/gunicorn_conf.py @@ -6,13 +6,13 @@ import os bind = "0.0.0.0:8012" # 工作进程数 -workers = multiprocessing.cpu_count() * 2 + 1 +workers = 3 # 工作进程类型 worker_class = "uvicorn.workers.UvicornWorker" # 工作进程超时时间 -timeout = 120 +timeout = 600 # 保持连接 keepalive = 5 diff --git a/public_function/deal_all_task.py b/public_function/deal_all_task.py index 1658b77..4bf1936 100644 --- a/public_function/deal_all_task.py +++ b/public_function/deal_all_task.py @@ -51,8 +51,7 @@ class DealAllTask: payload = {"padCodes": pad_code, "realIphoneTemplateId": 37} return self.send_post_get(api_endpoint, payload) - - def set_network_proxy(self,pad_code: list[str], country: str, proxy_platform="kkoip"): + def set_network_proxy(self, pad_code: list[str], country: str, proxy_platform="kkoip"): if proxy_platform == "kkoip": self.logger.info(f"{pad_code}使用kkoip") set_network_proxy(pad_codes=pad_code, account='6255452-2ff229fb', @@ -139,7 +138,9 @@ class DealAllTask: def check_phone_status(self, pad_code: list[str], file_name: str, times=10): count = 0 + self.logger.info(f"{pad_code};{file_name},开始等待180秒") time.sleep(180) + self.logger.info(f"{pad_code};{file_name},等待180秒结束") while True: try: result = self.async_execute_adb_command(pad_code, file_name, is_check=True) @@ -220,10 +221,10 @@ class DealAllTask: break -if __name__ == '__main__': - obj = DealAllTask() - results = obj.async_execute_adb_command(["ACP251024MKBZTCO"], "test_abc.js", is_check=True) - self.logger.info(type(results)) - if results: - self.logger.info(123113) - self.logger.info(f"1223{results}1223") +# if __name__ == '__main__': +# obj = DealAllTask() +# results = obj.async_execute_adb_command(["ACP251024MKBZTCO"], "test_abc.js", is_check=True) +# self.logger.info(type(results)) +# if results: +# self.logger.info(123113) +# self.logger.info(f"1223{results}1223")