f
This commit is contained in:
@@ -48,12 +48,12 @@ func main() {
|
||||
asynq := queue.NewCronJob(ctx, svcContext)
|
||||
mux := asynq.Register()
|
||||
|
||||
// 启动 asynq 消费者
|
||||
// Run 会阻塞;成功日志必须在 Run 之前打印
|
||||
fmt.Println("异步任务启动!!!")
|
||||
if err := svcContext.AsynqServer.Run(mux); err != nil {
|
||||
logx.WithContext(ctx).Errorf("异步任务启动失败: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println("异步任务启动!!!")
|
||||
}()
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
|
||||
Reference in New Issue
Block a user