From 900cb0c1c729cd1113fc6a4d5053040dac75cc15 Mon Sep 17 00:00:00 2001 From: fuzhongyun <15339891972@163.com> Date: Mon, 5 Jan 2026 10:59:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E8=BF=98=E5=8E=9F=20bot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/server/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 9b09f74..cf2585c 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -2,6 +2,7 @@ package main import ( "ai_scheduler/internal/config" + "context" "flag" "fmt" @@ -10,9 +11,9 @@ import ( func main() { configPath := flag.String("config", "./config/config_test.yaml", "Path to configuration file") - // onBot := flag.String("bot", "", "bot start") + onBot := flag.String("bot", "", "bot start") flag.Parse() - // ctx := context.Background() + ctx := context.Background() bc, err := config.LoadConfig(*configPath) if err != nil { log.Fatalf("加载配置失败: %v", err) @@ -26,7 +27,7 @@ func main() { cleanup() }() //钉钉机器人 - // app.DingBotServer.Run(ctx, *onBot) + app.DingBotServer.Run(ctx, *onBot) //定时任务 // app.Cron.Run(ctx) log.Fatal(app.HttpServer.Listen(fmt.Sprintf(":%d", bc.Server.Port)))