limit video_daily to below 10k in daily refresh

This commit is contained in:
simon 2022-04-14 16:18:08 +07:00
parent fd00369859
commit 4853a8b12b
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ class Reindex:
"""get daily refresh values"""
total_videos = self._get_total_hits("ta_video")
video_daily = ceil(total_videos / self.interval * self.MULTIPLY)
if video_daily >= 10000:
video_daily = 9999
total_channels = self._get_total_hits("ta_channel")
channel_daily = ceil(total_channels / self.interval * self.MULTIPLY)
total_playlists = self._get_total_hits("ta_playlist")