Skip to content

Commit

Permalink
Uniq ems_refresh targets if over a threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Nov 22, 2017
1 parent 7ed6dd1 commit d100b56
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 @@ -170,6 +170,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 d100b56

Please sign in to comment.