Skip to content

Commit

Permalink
Merge pull request ManageIQ#16868 from lfu/event_action_refresh_sync_…
Browse files Browse the repository at this point in the history
…1534631

Event state machine is added to replace the synchronous refresh.
(cherry picked from commit cac9ac7)

https://bugzilla.redhat.com/show_bug.cgi?id=1550725
  • Loading branch information
gmcculloug authored and d-m-u committed Jun 6, 2018
1 parent 358f89c commit ce32f93
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/models/ems_event/automate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ def refresh(*targets, sync)
refresh_targets = targets.collect { |t| get_target("#{t}_refresh_target") unless t.blank? }.compact.uniq
return if refresh_targets.empty?

task_ids = EmsRefresh.queue_refresh(refresh_targets, nil, :create_task => sync)

# Wait for the tasks to finish if we are doing a synchronous refresh
task_ids.each { |tid| MiqTask.wait_for_taskid(tid) } if sync
EmsRefresh.queue_refresh(refresh_targets, nil, :create_task => sync)
end

def refresh_new_target
Expand Down

0 comments on commit ce32f93

Please sign in to comment.