From a34614d815b44f853d9898f910feb760b103971c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milien=20Devos?= Date: Tue, 2 Mar 2021 14:58:28 +0000 Subject: [PATCH] fix instance health fetching --- src/instances.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instances.cr b/src/instances.cr index 079758a..49357db 100644 --- a/src/instances.cr +++ b/src/instances.cr @@ -42,7 +42,7 @@ spawn do monitors += response["psp"]["monitors"].as_a 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 error_message = response.try &.as?(String).try &.["errorStats"]? error_message ||= ex.message