From 7f0e4fe6076d9b55de2156b5c1c389e9609758c2 Mon Sep 17 00:00:00 2001 From: YGXB_net Date: Tue, 28 Apr 2026 15:03:13 +0800 Subject: [PATCH] =?UTF-8?q?perf(api):=20=E6=8F=90=E9=AB=98=E5=B9=B6?= =?UTF-8?q?=E5=8F=91=E8=AF=B7=E6=B1=82=E9=99=90=E5=88=B6=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=85=8D=E7=BD=AE=E5=86=99=E5=85=A5=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将并发请求限制从10提升到500 - 在配置写入时添加调试日志输出 --- app.go | 1 + internal/api/api.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 0fe4cb8..d85d695 100644 --- a/app.go +++ b/app.go @@ -65,6 +65,7 @@ func (a *App) GetConfig() config.Config { } func (a *App) WriteConfig(key string, value any) { + fmt.Println("写入配置:", key, value) config.WriteConfig(key, value) } diff --git a/internal/api/api.go b/internal/api/api.go index 73a4ca4..8f20428 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -23,7 +23,7 @@ var limit chan struct{} func init() { //限制同时请求数为500 - limit = make(chan struct{}, 10) + limit = make(chan struct{}, 500) } // InitConn 创建连接池