fix: 还原 bot

This commit is contained in:
fuzhongyun 2026-01-05 10:59:49 +08:00
parent 72ed9b3717
commit 900cb0c1c7
1 changed files with 4 additions and 3 deletions

View File

@ -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)))