mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-09 20:24:03 +00:00
Refactor client creation
This commit is contained in:
@@ -209,3 +209,10 @@ def rank_videos(db, n)
|
||||
# Return top
|
||||
return top[1..n]
|
||||
end
|
||||
|
||||
def make_client(url, context)
|
||||
client = HTTP::Client.new(URL, CONTEXT)
|
||||
client.read_timeout = 10.seconds
|
||||
client.connect_timeout = 10.seconds
|
||||
return client
|
||||
end
|
||||
|
Reference in New Issue
Block a user