Skip to content

Commit

Permalink
Merge pull request #16432 from agrare/add_back_ems_refresh_unique_target
Browse files Browse the repository at this point in the history
Unique EmsRefresh.refresh targets if there are over 1,000 targets
(cherry picked from commit fdb09c2)

https://bugzilla.redhat.com/show_bug.cgi?id=1517962
  • Loading branch information
Fryguy authored and simaishi committed Nov 27, 2017
1 parent d493121 commit d20081c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/ems_refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def self.queue_merge(targets, ems, create_task = false)
# Items will be naturally serialized since there is a dedicated worker.
MiqQueue.put_or_update(queue_options) do |msg, item|
targets = msg.nil? ? targets : msg.data.concat(targets)
targets.uniq! if targets.size > 1_000

# If we are merging with an existing queue item we don't need a new
# task, just use the original one
Expand Down

0 comments on commit d20081c

Please sign in to comment.