Skip to content

Commit

Permalink
Clean up code and add additional info message
Browse files Browse the repository at this point in the history
  • Loading branch information
emichaud998 committed Sep 6, 2024
1 parent b5a71ec commit 6b67260
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,17 @@ def skip_message
.map(&:address)
.uniq

check_limit = get_endpoint_availability_limit(endpoint_availability_limit)
if endpoint_availability_limit.present? && endpoint_availability_limit.to_i < endpoint_list.count
info %(
Only the first #{endpoint_availability_limit.to_i} endpoints of #{endpoint_list.count} total will be
checked.
)
end

endpoint_list.each_with_index do |address, index|
assert_valid_http_uri(address)

next if check_limit.present? && index >= check_limit
next if endpoint_availability_limit.present? && endpoint_availability_limit.to_i <= index

address = address.delete_suffix('/')
get("#{address}/metadata", client: nil, headers: { Accept: 'application/fhir+json' })
Expand Down

0 comments on commit 6b67260

Please sign in to comment.