fix: 测试环境禁用定时任务和钉钉机器人

This commit is contained in:
fuzhongyun 2026-01-05 10:53:44 +08:00
parent a47758213c
commit 72ed9b3717
1 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,6 @@ package main
import (
"ai_scheduler/internal/config"
"context"
"flag"
"fmt"
@ -11,9 +10,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)
@ -27,8 +26,8 @@ func main() {
cleanup()
}()
//钉钉机器人
app.DingBotServer.Run(ctx, *onBot)
// app.DingBotServer.Run(ctx, *onBot)
//定时任务
app.Cron.Run(ctx)
// app.Cron.Run(ctx)
log.Fatal(app.HttpServer.Listen(fmt.Sprintf(":%d", bc.Server.Port)))
}