fix: Outbox worker 改为后台 goroutine,避免阻塞 HTTP 启动
This commit is contained in:
@@ -90,7 +90,7 @@ func main() {
|
||||
outbox.SetHandler(service.NewOutboxHandler(db, wechatSvc))
|
||||
outboxCtx, cancelOutbox := context.WithCancel(context.Background())
|
||||
defer cancelOutbox()
|
||||
outbox.Start(outboxCtx)
|
||||
go outbox.Start(outboxCtx)
|
||||
|
||||
// 9. 创建 Gin 引擎
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
|
||||
Reference in New Issue
Block a user