Defect #11371
closedAPI Timeout - Ruby
0%
Description
code snippet:
class Issue < ActiveResource::Base
CONFIG = YAML::load_file('/../config/zenminer_config.yml') unless defined?(CONFIG)
self.site = CONFIG['redmine-site']
self.user = CONFIG['redmine-user']
self.password = CONFIG['redmine-user-password']
end
def store_issue_info_for_given_ids(ids)
issues = []
rows_inserted = 0
ids.each do |id|
begin
issue = Issue.find(id)
issues << issue
rescue ActiveResource::ResourceNotFound
puts "Issue with the ID of #{id} did not return a result"
end
end
end
I have around 750 id's that I am passing into this method. Everytime I run this method, it runs for a little bit and then either times out or gives a 502 error. Any idea what I can do to fix this?