mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-26 08:41:27 +00:00
Cursed code again, may rewrite again
Some checks failed
Stale issue handler / stale (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.17.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.18.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Some checks failed
Stale issue handler / stale (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.17.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.18.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
This commit is contained in:
@@ -115,7 +115,8 @@ class CompanionStatus
|
||||
end
|
||||
|
||||
private def healthcheck(companion : Config::CompanionConfig, index : Int32)
|
||||
client = HTTP::Client.new(companion.private_url, tls: @tlscontext)
|
||||
tls = @tlscontext if companion.private_url.scheme == "https"
|
||||
client = HTTP::Client.new(companion.private_url, tls: tls)
|
||||
client.connect_timeout = 10.seconds
|
||||
|
||||
response = client.get(CONFIG.check_backends_path)
|
||||
|
||||
@@ -260,10 +260,18 @@ module Invidious::Routes::BeforeAll::Companion
|
||||
working_companions = working_companions.community
|
||||
end
|
||||
|
||||
if !current_companion.nil?
|
||||
if working_companions.empty?
|
||||
current_companion = self.wrap_current_companion(env, host, current_companion, c_size, working_companions, preferences)
|
||||
return current_companion
|
||||
end
|
||||
end
|
||||
|
||||
if current_companion.nil?
|
||||
available_companion = self.get_available_companion(c_size, working_companions)
|
||||
if available_companion
|
||||
current_companion = available_companion
|
||||
current_companion = self.wrap_current_companion(env, host, current_companion, c_size, working_companions, preferences)
|
||||
return current_companion
|
||||
else
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user