summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2019-01-24 20:21:19 -0600
committerOmar Roth <omarroth@hotmail.com>2019-01-24 20:21:35 -0600
commit1af86f6afbba9a479f8d6a615c9f2a9d263d8c18 (patch)
tree99a24c0f71555935c862839661e8d93382f2a05d
parent4c77908bb492e6d9ee567bd4c2b2fe78e63aae33 (diff)
downloadinvidious-1af86f6afbba9a479f8d6a615c9f2a9d263d8c18.tar.gz
invidious-1af86f6afbba9a479f8d6a615c9f2a9d263d8c18.tar.bz2
invidious-1af86f6afbba9a479f8d6a615c9f2a9d263d8c18.zip
Add sleep to popular_videos and top_videos
-rw-r--r--src/invidious.cr4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index ad9510c1..f3404d23 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -126,6 +126,8 @@ top_videos = [] of Video
spawn do
pull_top_videos(CONFIG, PG_DB) do |videos|
top_videos = videos
+ sleep 1.minutes
+ Fiber.yield
end
end
@@ -133,6 +135,8 @@ popular_videos = [] of ChannelVideo
spawn do
pull_popular_videos(PG_DB) do |videos|
popular_videos = videos
+ sleep 1.minutes
+ Fiber.yield
end
end