mirror of
https://github.com/iv-org/instances-api.git
synced 2025-01-12 16:09:31 -05:00
Merge pull request #21 from unixfox/patch-1
fix instance health fetching
This commit is contained in:
commit
2845a0e7ff
@ -42,7 +42,7 @@ spawn do
|
|||||||
monitors += response["psp"]["monitors"].as_a
|
monitors += response["psp"]["monitors"].as_a
|
||||||
page += 1
|
page += 1
|
||||||
|
|
||||||
break if response["psp"]["perPage"].as_i * page > response["psp"]["totalMonitors"].as_i
|
break if response["psp"]["perPage"].as_i * (page - 1) + 1 > response["psp"]["totalMonitors"].as_i
|
||||||
rescue ex
|
rescue ex
|
||||||
error_message = response.try &.as?(String).try &.["errorStats"]?
|
error_message = response.try &.as?(String).try &.["errorStats"]?
|
||||||
error_message ||= ex.message
|
error_message ||= ex.message
|
||||||
|
Loading…
Reference in New Issue
Block a user