mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-22 13:37:24 +00:00
Update uptime logic to handle updown.io response
This commit is contained in:
parent
aa96cf3453
commit
9980c0e00f
@ -89,8 +89,8 @@ class Invidious::Jobs::InstanceListRefreshJob < Invidious::Jobs::BaseJob
|
|||||||
|
|
||||||
# Checks if the uptime of the target instance is greater than 90% over a 30 day period
|
# Checks if the uptime of the target instance is greater than 90% over a 30 day period
|
||||||
private def bad_uptime?(target_instance_health_monitor) : Bool
|
private def bad_uptime?(target_instance_health_monitor) : Bool
|
||||||
return true if !target_instance_health_monitor["statusClass"] == "success"
|
return true if !target_instance_health_monitor["down"].as_bool == false
|
||||||
return true if target_instance_health_monitor["30dRatio"]["ratio"].as_s.to_f < 90
|
return true if target_instance_health_monitor["uptime"].as_f < 90
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user