From 6b4ea53a32d8d2d0be8cf9519309b3502ee58221 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 28 Dec 2018 09:55:02 -0600 Subject: [PATCH] Add sleep time for update_decrypt_function --- src/invidious.cr | 2 ++ src/invidious/jobs.cr | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 256b6d12..6688e4a0 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -132,6 +132,8 @@ decrypt_function = [] of {name: String, value: Int32} spawn do update_decrypt_function do |function| decrypt_function = function + sleep 1.minutes + Fiber.yield end end diff --git a/src/invidious/jobs.cr b/src/invidious/jobs.cr index 8a90a031..df02c7fb 100644 --- a/src/invidious/jobs.cr +++ b/src/invidious/jobs.cr @@ -204,7 +204,6 @@ def update_decrypt_function end yield decrypt_function - Fiber.yield end end