Skip to content

Commit

Permalink
Exit the executor process when failed to connect to the rabbitmq mess…
Browse files Browse the repository at this point in the history
…age queue.
  • Loading branch information
guoqiangqi committed Jun 29, 2023
1 parent 0802992 commit ee2effb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func doRabbitMQ() {
gitee_utils.LogInstance.WithFields(logrus.Fields{
"context": "Rabbitmq connect error",
}).Info("info log")
os.Exit(1)
}
cc := gitee_utils.ConsumerConfig{
ExchangeName: RMQ_EXCHANGE_NAME,
Expand All @@ -53,6 +54,7 @@ func doRabbitMQ() {
gitee_utils.LogInstance.WithFields(logrus.Fields{
"context": "Consumer setup error",
}).Info("info log")
os.Exit(1)
}
gitee_utils.LogInstance.WithFields(logrus.Fields{
"context": "Consumer action success",
Expand Down

0 comments on commit ee2effb

Please sign in to comment.