Skip to content

Commit

Permalink
Merge pull request ManageIQ#18339 from bdunne/refactor_update_request…
Browse files Browse the repository at this point in the history
…_status

Remove unnecessary code from MiqRequest#update_request_status
  • Loading branch information
gmcculloug authored Jan 17, 2019
2 parents d1bfff8 + f7e786f commit d7a00ec
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/models/miq_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,8 @@ def update_request_status
task_count = miq_request_tasks.count
miq_request_tasks.each do |p|
states[p.state] += 1
states[:total] += 1
status[p.status] += 1
end
total = states.delete(:total).to_i
unknown_state = task_count - total
states["unknown"] = unknown_state unless unknown_state.zero?
msg = states.sort.collect { |s| "#{s[0].capitalize} = #{s[1]}" }.join("; ")

req_state = (states.length == 1) ? states.keys.first : "active"
Expand Down

0 comments on commit d7a00ec

Please sign in to comment.