bin/check-stale-results.rb in sensu-plugins-sensu-4.0.0 vs bin/check-stale-results.rb in sensu-plugins-sensu-4.1.0
- old
+ new
@@ -87,12 +87,10 @@
http.request request # Net::HTTPResponse object
end
end
def results
- res = []
- req = api_request(:GET, '/results')
- res = JSON.parse(req.body) if req&.code == '200'
+ res = paginated_get('/results')
res
end
def run
stale = 0