mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-30 02:32:45 +00:00
Thread safety and not try none-working backends (#140)
Co-authored-by: Kevinf100 <12779728+kevinf100@users.noreply.github.com> commit0fe9e0a28aAuthor: Kevinf100 <12779728+kevinf100@users.noreply.github.com> Date: Thu Jun 5 11:41:02 2025 -0400 More thread safety and speed improvements commit54ea7f04fdAuthor: Kevinf100 <12779728+kevinf100@users.noreply.github.com> Date: Tue Jun 3 23:37:20 2025 -0400 Many thread safe updates. Updating instances timesout after 10 seconds. Now waits until checking all instances finishes before starting the timer for next. More random debugging logs commit4dcd6dd2f4Author: Kevinf100 <12779728+kevinf100@users.noreply.github.com> Date: Tue Jun 3 10:34:56 2025 -0400 Update API to only try working backends with companion
This commit is contained in:
@@ -46,7 +46,8 @@ module Invidious::Routes::BeforeAll
|
||||
begin
|
||||
current_companion = env.request.cookies[CONFIG.server_id_cookie_name].value.try &.to_i
|
||||
rescue
|
||||
current_companion = rand(CONFIG.invidious_companion.size)
|
||||
working_ends = BackendInfo.get_working_ends
|
||||
current_companion = working_ends.sample
|
||||
end
|
||||
|
||||
if current_companion > CONFIG.invidious_companion.size
|
||||
|
||||
Reference in New Issue
Block a user