Skip to content

Commit

Permalink
[api] function for manual updating all issues without any limiter (ma…
Browse files Browse the repository at this point in the history
…nual only)
  • Loading branch information
adrianschroeter committed Jan 24, 2012
1 parent 0c6c125 commit c832c48
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/api/app/models/issue_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ def update_issues()
return false
end

# this function is usually never called. Just for debugging and disaster recovery
def enforced_update_all_issues()
issues = Issue.find :all, :conditions => ["issue_tracker_id = BINARY ?", self.id]
ids = issues.map{ |x| x.name.to_s }

private_fetch_issues(ids)
return true
end

def fetch_issues(issues=nil)
unless issues
# find all new issues for myself
Expand All @@ -107,7 +116,7 @@ def fetch_issues(issues=nil)

ids = issues.map{ |x| x.name.to_s }

return private_fetch_issues(ids)
private_fetch_issues(ids)
return true
end

Expand Down

0 comments on commit c832c48

Please sign in to comment.