Fix views processing hour 0
This commit is contained in:
parent
1227fe070e
commit
cc49be3e35
|
@ -215,7 +215,7 @@ class Redis {
|
||||||
}
|
}
|
||||||
|
|
||||||
private generateVideoViewKey (videoId: number, hour?: number) {
|
private generateVideoViewKey (videoId: number, hour?: number) {
|
||||||
if (!hour) hour = new Date().getHours()
|
if (hour === undefined || hour === null) hour = new Date().getHours()
|
||||||
|
|
||||||
return `video-view-${videoId}-h${hour}`
|
return `video-view-${videoId}-h${hour}`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue