Skip to content

Commit

Permalink
update: 恢复定时任务
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Mar 1, 2024
1 parent c0b13a5 commit b01481a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/gogf/gf/v2/os/gcmd"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/os/gres"
"kes-cron/internal/boot"
"kes-cron/internal/global/g_consts"
"kes-cron/internal/global/g_structs"
"kes-cron/utility/cron_utils"
Expand All @@ -31,6 +32,7 @@ var (
return nil
},
}

Main = gcmd.Command{
Name: "main",
Usage: "main",
Expand Down Expand Up @@ -84,11 +86,11 @@ var (
glog.Notice(ctx, "当前后端地址: ", g_consts.BackendBaseUrl())

// 初始化
//if err := boot.Boot(serverInitData); err != nil {
// glog.Fatal(ctx, "初始化任务失败: ", err)
// time.Sleep(5 * time.Second)
// return err
//}
if err := boot.Boot(serverInitData); err != nil {
glog.Fatal(ctx, "初始化任务失败: ", err)
time.Sleep(5 * time.Second)
return err
}

// 启动服务
s := g.Server()
Expand Down

0 comments on commit b01481a

Please sign in to comment.