mirror of
https://github.com/iv-org/instances-api.git
synced 2024-12-26 07:59:27 -05:00
Fix typo in monitor handling
This commit is contained in:
parent
4453c26112
commit
0e888b0857
@ -49,6 +49,7 @@ spawn do
|
|||||||
error_message = response.try &.["errorStats"]?
|
error_message = response.try &.["errorStats"]?
|
||||||
error_message ||= ex.message
|
error_message ||= ex.message
|
||||||
puts "Exception pulling monitors: #{error_message}"
|
puts "Exception pulling monitors: #{error_message}"
|
||||||
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ spawn do
|
|||||||
end
|
end
|
||||||
|
|
||||||
monitor = monitors.try &.select { |monitor| monitor["name"].try &.as_s == host }[0]?
|
monitor = monitors.try &.select { |monitor| monitor["name"].try &.as_s == host }[0]?
|
||||||
INSTANCES[host] = {flag: flag, region: region, stats: stats, type: type, uri: uri.to_s, monitor: monitor}
|
INSTANCES[host] = {flag: flag, region: region, stats: stats, type: type, uri: uri.to_s, monitor: monitor || INSTANCES[host]?.try &.[:monitor]?}
|
||||||
end
|
end
|
||||||
|
|
||||||
sleep 5.minutes
|
sleep 5.minutes
|
||||||
|
Loading…
Reference in New Issue
Block a user