批量只支持20个以内

This commit is contained in:
liuwei
2025-04-22 15:13:57 +08:00
parent 9c66d62371
commit ccad7366f7
2 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import logging
import threading
import time
from argparse import ArgumentParser
import uvicorn
from fastapi import FastAPI
@@ -98,7 +99,8 @@ def main(chat_type: int):
if error_msg:
logger.error("登录失败")
return
#休眠等待server启动防止回调设置失败
time.sleep(10)
resp = client.set_callback(token, callback_url)
print(f"set_callback:{resp}")

View File

@@ -452,7 +452,7 @@ class Robot(Job):
"""更新联系人详细信息(昵称等)"""
try:
# 将wxid列表分批处理每批50个
batch_size = 50
batch_size = 10
wxids = list(contacts_dict.keys())
for i in range(0, len(wxids), batch_size):