mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-31 21:39:41 +08:00
fix: logs
This commit is contained in:
@@ -138,9 +138,9 @@ func (vc *VideoCrawler) startLiveCrawler(enterPoint PointF) error {
|
|||||||
|
|
||||||
liveRoom, err := vc.getCurrentVideo()
|
liveRoom, err := vc.getCurrentVideo()
|
||||||
if err != nil || liveRoom.Type != VideoType_Live {
|
if err != nil || liveRoom.Type != VideoType_Live {
|
||||||
if vc.failedCount >= 5 {
|
if vc.failedCount >= 3 {
|
||||||
// failed 5 consecutive times
|
// failed 3 consecutive times
|
||||||
return errors.New("get current live event trackings failed 5 consecutive times")
|
return errors.New("get current live event trackings failed 3 consecutive times")
|
||||||
}
|
}
|
||||||
// retry
|
// retry
|
||||||
vc.failedCount++
|
vc.failedCount++
|
||||||
@@ -342,9 +342,6 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
|
|||||||
|
|
||||||
// simulation watch feed video
|
// simulation watch feed video
|
||||||
sleepStrict(swipeFinishTime, screenResult.Video.PlayDuration)
|
sleepStrict(swipeFinishTime, screenResult.Video.PlayDuration)
|
||||||
|
|
||||||
log.Warn().Interface("video", feedVideo).
|
|
||||||
Msg("get unexpected video type")
|
|
||||||
}
|
}
|
||||||
screenResult.TotalElapsed = time.Since(swipeFinishTime).Milliseconds()
|
screenResult.TotalElapsed = time.Since(swipeFinishTime).Milliseconds()
|
||||||
|
|
||||||
@@ -436,6 +433,7 @@ func (vc *VideoCrawler) getCurrentVideo() (video *Video, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Info().
|
log.Info().
|
||||||
|
Str("type", string(video.Type)).
|
||||||
Interface("userName", video.UserName).
|
Interface("userName", video.UserName).
|
||||||
Msg("get current video success")
|
Msg("get current video success")
|
||||||
return video, nil
|
return video, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user