From 34f2832bef490cdce29ebb60c3bf17c3d9160f8a Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 28 七月 2022 11:22:51 +0800 Subject: [PATCH] 优化gps信息存入数据库 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java index 0261209..1bfb730 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java @@ -75,21 +75,11 @@ if (startGetMedia != null) { startGetMedia.remove(zlmServerConfig.getGeneralMediaServerId()); } - mediaServerService.zlmServerOnline(zlmServerConfig); } }); - // 璁㈤槄 zlm淇濇椿浜嬩欢, 褰搝lm绂荤嚎鏃跺仛涓氬姟鐨勫鐞� - hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_keepalive,new JSONObject(), - (MediaServerItem mediaServerItem, JSONObject response)->{ - String mediaServerId = response.getString("mediaServerId"); - if (mediaServerId !=null ) { - mediaServerService.updateMediaServerKeepalive(mediaServerId, response.getJSONObject("data")); - } - }); - // 鑾峰彇zlm淇℃伅 - logger.info("[zlm鎺ュ叆]绛夊緟榛樿zlm涓�..."); + logger.info("[zlm] 绛夊緟榛樿zlm涓�..."); // 鑾峰彇鎵�鏈夌殑zlm锛� 骞跺紑鍚富鍔ㄨ繛鎺� List<MediaServerItem> all = mediaServerService.getAllFromDatabase(); @@ -113,6 +103,7 @@ } startGetMedia = null; } + hookSubscribe.removeSubscribe(ZLMHttpHookSubscribe.HookType.on_server_started, new JSONObject()); // TODO 娓呯悊鏁版嵁搴撲腑涓巖edis涓嶅尮閰嶇殑zlm }, 60 * 1000 ); } -- Gitblit v1.8.0