From 71a5b8c236d7538053a3a893adccaa0d59798521 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 20 二月 2021 15:26:52 +0800
Subject: [PATCH] 4936 【工具】没有绿的异常报错增加发送运维邮件通知

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 59c2f77..4ad6cf0 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -1842,20 +1842,12 @@
     if mapServerPack.GetState() not in [0,1,2,3] and curMap.GetState() != mapServerPack.GetState():
         # 记录服务器是否正常开启完毕, 避免重复发送
         GameWorld.DebugLog("MapServer_RunningStateRefresh--_%s"%([mapServerPack.GetState(), curMap.GetState(), mapServerPack.GetMapID(), curMap.GetID()]))
-        SendGameError("MapError")
+        GameWorld.SendGameError("MapError")
         
     curMap.SetState(mapServerPack.GetState())
     curMap.SetRefreshTick(tick)
     
     return
-
-
-def SendGameError(state):
-    getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl")
-    groupID = ReadChConfig.GetPyMongoConfig("platform", "GroupID")
-    userDBName = ReadChConfig.GetPyMongoConfig("connect", "USER_DB_NAME")
-    getUrl = getUrl + "?Type=%s&groupID=%s&userDBName=%s"%(state, groupID, userDBName)
-    GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
     
 ## 刷新地图服务器状态, 如果1分钟没有状态回报, 刷新为消失状态
 #  @param tick 当前时间
@@ -1883,7 +1875,7 @@
         curMap.SetState(IPY_GameServer.mssNone)
         if not isSendMapClose:
             # 避免多地图发送过多邮件, 如关服的时候
-            SendGameError("MapDisconnect")   # 状态报告
+            GameWorld.SendGameError("MapDisconnect")   # 状态报告
             isSendMapClose = True
 
     return
@@ -1942,6 +1934,6 @@
 def ChangeGameServerState(state):
     # 只接收大于等于mssPyError
     GameWorld.DebugLog("ChangeGameServerState:%s"%state)
-    SendGameError("GameServerError")
+    GameWorld.SendGameError("GameServerError")
     
     
\ No newline at end of file

--
Gitblit v1.8.0