Skip to content

Commit

Permalink
Merge pull request #16868 from lfu/event_action_refresh_sync_1534631
Browse files Browse the repository at this point in the history
Event state machine is added to replace the synchronous refresh.
  • Loading branch information
gmcculloug authored Jan 25, 2018
2 parents fde3d11 + 31252c1 commit cac9ac7
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 cac9ac7

Please sign in to comment.