Skip to content

Commit

Permalink
Splitting the calls to see if it is the open or the read that is exce…
Browse files Browse the repository at this point in the history
…eding the limit

Adding an open timeout and upping the read timeout
  • Loading branch information
carolyncole committed Oct 16, 2024
1 parent 95df908 commit f891237
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lib/describe_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def rss_url_list
# Parse the rss_url, get a JSON resource url for each item, convert it to XML, and pass it to traject
def perform_indexing
rss_url_list.each do |url|
resource_json = URI.open(url, read_timeout: 30).read
uri = URI.open(url, open_timeout: 60, read_timeout: 60)
resource_json = uri.read
resource_xml = prep_for_indexing(resource_json)
traject_indexer.process(resource_xml)
Rails.logger.info "Successfully imported record from #{url}."
Expand Down

0 comments on commit f891237

Please sign in to comment.