Project

General

Profile

Actions

Defect #11371

closed

API Timeout - Ruby

Added by Jake Sorce almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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?

Actions #1

Updated by Jean-Philippe Lang almost 13 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Sorry, no support request here.

Actions

Also available in: Atom PDF