From c8b9e590efaf5e7a10724b5f26f14de741e3c8a7 Mon Sep 17 00:00:00 2001
From: chenjialing <595168663@qq.com>
Date: 星期五, 25 二月 2022 09:23:46 +0800
Subject: [PATCH] 日志优化--优化本地的日志记录方式,增加druid的sql的日志打印和监控面板,修改druid的配置方式
---
src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
index 76b4427..8c8565b 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -5,6 +5,7 @@
import com.genersoft.iot.vmp.gb28181.bean.GbStream;
import com.genersoft.iot.vmp.gb28181.event.offline.OfflineEvent;
import com.genersoft.iot.vmp.gb28181.event.platformKeepaliveExpire.PlatformKeepaliveExpireEvent;
+import com.genersoft.iot.vmp.gb28181.event.platformNotRegister.PlatformCycleRegisterEvent;
import com.genersoft.iot.vmp.gb28181.event.platformNotRegister.PlatformNotRegisterEvent;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import com.genersoft.iot.vmp.media.zlm.event.ZLMOfflineEvent;
@@ -67,6 +68,16 @@
platformNotRegisterEvent.setPlatformGbID(platformGbId);
applicationEventPublisher.publishEvent(platformNotRegisterEvent);
}
+
+ /**
+ * 骞冲彴鍛ㄦ湡娉ㄥ唽浜嬩欢
+ * @param paltformGbId
+ */
+ public void platformRegisterCycleEventPublish(String paltformGbId) {
+ PlatformCycleRegisterEvent platformCycleRegisterEvent = new PlatformCycleRegisterEvent(this);
+ platformCycleRegisterEvent.setPlatformGbID(paltformGbId);
+ applicationEventPublisher.publishEvent(platformCycleRegisterEvent);
+ }
/**
* 璁惧鎶ヨ浜嬩欢
@@ -120,7 +131,7 @@
}
@Async
- public void catalogEventPublishForStream(String platformId, List<GbStream> gbStreams, String type) {
+ public void catalogEventPublishForStream(String platformId, GbStream[] gbStreams, String type) {
CatalogEvent outEvent = new CatalogEvent(this);
outEvent.setGbStreams(gbStreams);
outEvent.setType(type);
@@ -130,8 +141,7 @@
@Async
public void catalogEventPublishForStream(String platformId, GbStream gbStream, String type) {
- List<GbStream> gbStreamList = new ArrayList<>();
- gbStreamList.add(gbStream);
- catalogEventPublishForStream(platformId, gbStreamList, type);
+ GbStream[] gbStreams = {gbStream};
+ catalogEventPublishForStream(platformId, gbStreams, type);
}
}
--
Gitblit v1.8.0