Skip to content

Commit

Permalink
fix: fix bug in SaveStatistic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayanami1314 committed Nov 9, 2024
1 parent aace119 commit 73c3bf8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion middleware/statistic.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ func SaveStatistic() {
// 4. save dau item
log.Printf("today: %s", today)
log.Printf("pv: %d, uv: %d", curPVCount, curUVCount)
log.Printf("uv data(first 10): %v", curUVData.ToArray()[:10])
if curUVCount >= 10 {
log.Printf("uv data(first 10): %v", curUVData.ToArray()[:10])
} else {
log.Printf("uv data: %v", curUVData.ToArray())
}

// TODO: save uv, pv, dau to db

Expand Down

0 comments on commit 73c3bf8

Please sign in to comment.