From 5aac0da156bee3abdcbf92df9f7321b3d3d8142f Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 3 Mar 2019 23:31:39 -0600 Subject: [PATCH] Add sleep for decrypt_function --- src/invidious.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 558cc304..8ef05623 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -105,6 +105,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 @@ -118,6 +120,7 @@ before_all do |env| locale ||= "en-US" env.set "locale", locale end + # API Endpoints get "/api/v1/stats" do |env|