|
@@ -146,10 +146,12 @@ func adsHandler(c *gin.Context) {
|
146
|
146
|
}
|
147
|
147
|
|
148
|
148
|
log.WithField("request_id", dspInfo.RequestId).Infof("freq control conf: %+v", freqControlConf)
|
149
|
|
- hour, _ := strconv.Atoi(time.Now().Format("01"))
|
150
|
|
- tmpControlInterval, ok := freqControlConf.GetControlTime(hour)
|
151
|
|
- if ok {
|
152
|
|
- freqControlInterval = tmpControlInterval
|
|
149
|
+ if freqControlConf != nil {
|
|
150
|
+ hour, _ := strconv.Atoi(time.Now().Format("01"))
|
|
151
|
+ tmpControlInterval, ok := freqControlConf.GetControlTime(hour)
|
|
152
|
+ if ok {
|
|
153
|
+ freqControlInterval = tmpControlInterval
|
|
154
|
+ }
|
153
|
155
|
}
|
154
|
156
|
}
|
155
|
157
|
|
|
@@ -189,6 +191,7 @@ func adsHandler(c *gin.Context) {
|
189
|
191
|
c.String(404, "get req channel flag failed: %s", err)
|
190
|
192
|
return
|
191
|
193
|
}
|
|
194
|
+
|
192
|
195
|
flowWeight := reqChannelFlag.Weigth
|
193
|
196
|
flowRandomNum := rand.Intn(100)
|
194
|
197
|
|