From 72be59200c2051bf4d76c14fec028161d25a54fd Mon Sep 17 00:00:00 2001 From: Clement Li Date: Tue, 2 Nov 2021 16:58:19 +0800 Subject: [PATCH] add loop --- src/gitee-utils/message.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gitee-utils/message.go b/src/gitee-utils/message.go index 35f688b..b7047e1 100644 --- a/src/gitee-utils/message.go +++ b/src/gitee-utils/message.go @@ -231,13 +231,14 @@ func (c *Consumer) consume(channel *amqp.Channel, id int) { log.Println("[", id, "] Running ...") log.Println("[", id, "] Press CTRL+C to exit ...") + forever := make(chan bool) for msg := range msgs { err := eventHandler(msg) if err != nil { log.Println("something wrong with executor", err) - return } } + <-forever log.Println("[", id, "] Exiting ...") } -- Gitee