10138 内存分析(修复跨服运营活动读取活动配置属性bug)
| | |
| | | import datetime
|
| | | import subprocess
|
| | | import binascii
|
| | | import inspect
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | |
|
| | |
| | | # 由于float会有不精确的现象出现xxx.9999999的问题,所以这里计算出的结果向上取整
|
| | | return int(math.ceil(round(floatRMB * 100)))
|
| | |
|
| | | def get_class_method(cls, startswith=""):
|
| | | ## 获取类中的所有方法
|
| | | methods = []
|
| | | members = inspect.getmembers(cls)
|
| | | for member_name, member in members:
|
| | | if startswith and not member_name.startswith(startswith):
|
| | | continue
|
| | | if inspect.ismethod(member):
|
| | | methods.append(member_name)
|
| | | return methods
|
| | |
| | | import CrossRealmMsg
|
| | | import PyGameData
|
| | | import ChConfig
|
| | | import CommFunc
|
| | |
|
| | | import datetime
|
| | | import time
|
| | |
| | |
|
| | | # ipyData 活动时间表信息由跨服服务器同步子服,活动内容取子服自己的
|
| | | ipyDataDict = {}
|
| | | for k, v in ipyData.__dict__.items():
|
| | | if k in ["NotifyInfoStart", "NotifyInfoEnd", "NotifyInfoLoop", "ServerIDRangeList"]:
|
| | | methods = CommFunc.get_class_method(ipyData, "Get") # 获取所有Get开头的方法
|
| | | for method_name in methods:
|
| | | if method_name in ["GetNotifyInfoStart", "GetNotifyInfoEnd", "GetNotifyInfoLoop", "GetServerIDRangeList"]:
|
| | | continue
|
| | | ipyDataDict[k] = v
|
| | | ipyDataDict[method_name[3:]] = getattr(ipyData, method_name)()
|
| | | ipyDataDict.update({"StartDate":startDateStr, "EndDate":endDateStr})
|
| | | GameWorld.Log(" ipyDataDict=%s" % ipyDataDict)
|
| | |
|