细节优化

This commit is contained in:
zayac 2024-07-19 15:29:02 +08:00
parent 37136d2410
commit 37b0ea4bc7
4 changed files with 3 additions and 5 deletions

View File

@ -146,7 +146,7 @@ def update_agent_url(url_list, url_type):
if "代理web" in context.replace(" ", "").lower():
try:
with engine.connect() as connection:
update_stmt = sql_text("UPDATE sys_platform SET url = :url WHERE nickname = :url_type")
update_stmt = sql_text("UPDATE sys_platform SET url = :url,update_time=NOW() WHERE nickname = :url_type")
connection.execute(update_stmt, {"url": url, "url_type": url_type})
connection.commit()
logger.debug(f"{url_type}后台链接更新成功")

View File

@ -25,7 +25,6 @@ ENV RABBITMQ_USER=bot
ENV RABBITMQ_PASSWORD=xiaomi@123
ENV RABBITMQ_HOST=mq.stupidpz.com
ENV RABBITMQ_PORT=5672
ENV TELEGRAM_BOT_TOKEN=<your_telegram_bot_token>
ENV TZ=Asia/Shanghai
# 配置健康检查

View File

@ -150,7 +150,7 @@ def handle_login_failure(account: Account):
pass
def base64_api(uname='luffy230505', pwd='qwer12345', img='', typeid=20):
def base64_api(uname='luffy230505', pwd='XIAOmi123', img='', typeid=20):
logger.info('Calling third part interfaces')
data = {
"username": uname,

View File

@ -11,7 +11,6 @@ rabbitmq_user = os.getenv("RABBITMQ_USER", "bot")
rabbitmq_password = os.getenv("RABBITMQ_PASSWORD", "xiaomi@123")
rabbitmq_host = os.getenv("RABBITMQ_HOST", "mq.stupidpz.com")
rabbitmq_port = int(os.getenv("RABBITMQ_PORT", 5672))
telegram_bot_token = os.getenv("TELEGRAM_BOT_TOKEN")
# 移除默认的日志处理器
logger.remove()
@ -66,7 +65,7 @@ async def _send_message_to_user(bot_token, target_id, message, rate_limiter, ses
return
else:
logger.debug('消息发送失败,重试中...')
logger.error(await response.text())
logger.error(f'{params},发送失败,返回值:{await response.text()}')
except aiohttp.ClientError as e:
logger.error(f'网络异常,重试中... 错误详情: {e}')
await asyncio.sleep(10)