From d721708615e1cf27309e404a28707dafc358e1d0 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 15:23:33 +0800 Subject: [PATCH 1/3] fix --- model/gmodel/fs_user_logic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index f6a512ea..26feef96 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -143,7 +143,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT logcontent := "" defer func() { - logx.Info("aaaa:", logcontent, err) + logx.Info("aaaa:", logcontent, " ", err.Error()) }() err = u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { From f2c4dc97e7c84ccdaa1a7b3624180af7de05176e Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 15:28:03 +0800 Subject: [PATCH 2/3] fix --- initalize/rabbitmq.go | 8 +++----- server/websocket/etc/websocket.yaml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/initalize/rabbitmq.go b/initalize/rabbitmq.go index 58a26645..8a114806 100644 --- a/initalize/rabbitmq.go +++ b/initalize/rabbitmq.go @@ -6,10 +6,11 @@ import ( "errors" "fusenapi/constants" "fusenapi/utils/mq_consumer_factory" - "github.com/streadway/amqp" - "github.com/zeromicro/go-zero/core/logx" "log" "sync" + + "github.com/streadway/amqp" + "github.com/zeromicro/go-zero/core/logx" ) type RabbitMqHandle struct { @@ -25,9 +26,6 @@ type queueItem struct { var mapMq = make(map[constants.RABBIT_MQ]queueItem) func InitRabbitMq(url string, config *tls.Config) *RabbitMqHandle { - if url == "" { - return nil - } conn, err := amqp.DialTLS(url, config) if err != nil { log.Fatalf("Failed to connect to RabbitMQ: %v", err) diff --git a/server/websocket/etc/websocket.yaml b/server/websocket/etc/websocket.yaml index 541de5e4..1ad7f5dd 100644 --- a/server/websocket/etc/websocket.yaml +++ b/server/websocket/etc/websocket.yaml @@ -10,7 +10,7 @@ Auth: AccessSecret: fusen2023 AccessExpire: 2592000 RefreshAfter: 1592000 -SourceRabbitMq: #amqp://rabbit001:rabbit001129@110.41.19.98:5672 +SourceRabbitMq: amqp://rabbit001:rabbit001129@110.41.19.98:5672 AWS: S3: Credentials: From 7337895773bd928e9556fd0bc3c7845e41d2e89b Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 15:29:29 +0800 Subject: [PATCH 3/3] fix --- server/websocket/etc/websocket.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/websocket/etc/websocket.yaml b/server/websocket/etc/websocket.yaml index 1ad7f5dd..7b81feec 100644 --- a/server/websocket/etc/websocket.yaml +++ b/server/websocket/etc/websocket.yaml @@ -10,7 +10,7 @@ Auth: AccessSecret: fusen2023 AccessExpire: 2592000 RefreshAfter: 1592000 -SourceRabbitMq: amqp://rabbit001:rabbit001129@110.41.19.98:5672 +SourceRabbitMq: "amqp://rabbit001:rabbit001129@110.41.19.98:5672" AWS: S3: Credentials: