feat: dataReport 增加 disabled 开关,默认关闭埋点与上报
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -81,8 +81,9 @@ func Run(args []string) {
|
||||
initData()
|
||||
initSeoPush()
|
||||
dataReport.Init(dataReport.Config{
|
||||
ApiUrl: webg.Conf.DataReport.Url,
|
||||
RunMod: webg.Conf.RunMod,
|
||||
ApiUrl: webg.Conf.DataReport.Url,
|
||||
RunMod: webg.Conf.RunMod,
|
||||
Disabled: webg.Conf.DataReport.Disabled,
|
||||
})
|
||||
|
||||
initHttpServer()
|
||||
|
||||
@@ -19,6 +19,9 @@ const (
|
||||
)
|
||||
|
||||
func Report() {
|
||||
if !dataReport.Enabled() {
|
||||
return
|
||||
}
|
||||
//防止重入
|
||||
if isRuining {
|
||||
return
|
||||
|
||||
+2
-1
@@ -58,7 +58,8 @@ type GlobalCfgEx struct {
|
||||
} `yaml:"playletMediaResourceDBCfg"`
|
||||
NewInnerStatUrl string `yaml:"newInnerStatUrl"`
|
||||
DataReport struct {
|
||||
Url string `yaml:"url"`
|
||||
Url string `yaml:"url"`
|
||||
Disabled bool `yaml:"disabled"`
|
||||
} `yaml:"dataReport"`
|
||||
NewPayCenter payCenter.Conf `yaml:"newPayCenter"`
|
||||
DataCenterBackflow struct {
|
||||
|
||||
Reference in New Issue
Block a user