From 1af86f6afbba9a479f8d6a615c9f2a9d263d8c18 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 24 Jan 2019 20:21:19 -0600 Subject: [PATCH] Add sleep to popular_videos and top_videos --- src/invidious.cr | 4 ++++ 1 file changed, 4 insertions(+) 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