From 90b1ffae4c17a53414dec17e8689e4276af8edd5 Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Mon, 12 Aug 2024 16:39:27 +0800 Subject: [PATCH 1/3] fix: add log --- internal/push/push_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 249622a59..26241ee2e 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -91,8 +91,8 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) { } sec := msgFromMQ.MsgData.SendTime / 1000 nowSec := timeutil.GetCurrentTimestampBySecond() - log.ZDebug(ctx, "push msg", "msg", pbData.String(), "sec", sec, "nowSec", nowSec) if nowSec-sec > 10 { + log.ZWarn(ctx, "ignore push msg", nil, "msg", pbData.String(), "sec", sec, "nowSec", nowSec, "nowSec-sec", nowSec-sec) return } var err error From f6acda0203960bcf398e74f229fd49be527f480f Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Mon, 12 Aug 2024 18:19:05 +0800 Subject: [PATCH 2/3] fix: del return --- internal/push/push_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 26241ee2e..9ee91e404 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -91,9 +91,9 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) { } sec := msgFromMQ.MsgData.SendTime / 1000 nowSec := timeutil.GetCurrentTimestampBySecond() + if nowSec-sec > 10 { log.ZWarn(ctx, "ignore push msg", nil, "msg", pbData.String(), "sec", sec, "nowSec", nowSec, "nowSec-sec", nowSec-sec) - return } var err error switch msgFromMQ.MsgData.SessionType { From 5c4bd20e11e9fd378e52c0b93f30bdafb337eb05 Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Mon, 12 Aug 2024 18:22:12 +0800 Subject: [PATCH 3/3] fix: push config --- config/openim-push.yml | 4 ++-- start-config.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/openim-push.yml b/config/openim-push.yml index 9384008a0..b9e0af0ca 100644 --- a/config/openim-push.yml +++ b/config/openim-push.yml @@ -4,13 +4,13 @@ rpc: # IP address that the RPC service listens on; setting to 0.0.0.0 listens on both internal and external IPs. If left blank, it automatically uses the internal network IP listenIP: 0.0.0.0 # List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances. These must match the number of configured prometheus ports - ports: [ 10170 ] + ports: [ 10170, 10171, 10172, 10173 ] prometheus: # Enable or disable Prometheus monitoring enable: true # List of ports that Prometheus listens on; these must match the number of rpc.ports to ensure correct monitoring setup - ports: [ 20107 ] + ports: [ 20107, 20207, 20208, 20209 ] maxConcurrentWorkers: 3 #"Use geTui for offline push notifications, or choose fcm or jpns; corresponding configuration settings must be specified." diff --git a/start-config.yml b/start-config.yml index 21436d7a9..a6d3e47af 100644 --- a/start-config.yml +++ b/start-config.yml @@ -3,7 +3,7 @@ serviceBinaries: openim-crontask: 1 openim-rpc-user: 1 openim-msggateway: 1 - openim-push: 1 + openim-push: 4 openim-msgtransfer: 4 openim-rpc-conversation: 1 openim-rpc-auth: 1