Skip to content

Commit

Permalink
Inventory collection logging is bad
Browse files Browse the repository at this point in the history
Inventory collection logging is bad
  • Loading branch information
Ladas committed Aug 16, 2018
1 parent 0dcf298 commit d221841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/manager_refresh/inventory_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def unique_indexes
@unique_indexes_cache = model_class.connection.indexes(model_class.table_name).select(&:unique)

if @unique_indexes_cache.blank?
raise "#{inventory_collection} and its table #{model_class.table_name} must have a unique index defined, to"\
raise "#{self} and its table #{model_class.table_name} must have a unique index defined, to"\
" be able to use saver_strategy :concurrent_safe or :concurrent_safe_batch."
end

Expand All @@ -679,7 +679,7 @@ def unique_index_for(keys)
uniq_key_candidates = unique_indexes.each_with_object([]) { |i, obj| obj << i if (keys - i.columns.map(&:to_sym)).empty? }

if @unique_indexes_cache.blank?
raise "#{inventory_collection} and its table #{model_class.table_name} must have a unique index defined "\
raise "#{self} and its table #{model_class.table_name} must have a unique index defined "\
"covering columns #{keys} to be able to use saver_strategy :concurrent_safe or :concurrent_safe_batch."
end

Expand Down

0 comments on commit d221841

Please sign in to comment.