This commit is contained in:
laodaming
2023-08-07 11:49:17 +08:00
parent 00bbe2b4e9
commit 31eb49efa3
3 changed files with 8 additions and 7 deletions

View File

@@ -32,12 +32,12 @@ func main() {
defer server.Stop()
ctx := svc.NewServiceContext(c)
handler.RegisterHandlers(server, ctx)
//消费渲染前组装数据队列
ctx1 := context.Background()
ctx2, cancel := context.WithCancel(ctx1)
defer cancel()
go ctx.RabbitMq.Consume(ctx2, constants.RABBIT_MQ_ASSEMBLE_RENDER_DATA, &consumer.MqConsumerRenderAssemble{})
handler.RegisterHandlers(server, ctx)
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
server.Start()
}