Small performance improvement for sync with many new articles
This commit is contained in:
parent
5fa61912c9
commit
cd164bc3eb
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ class Supplier < ApplicationRecord
|
|||
shared_supplier
|
||||
.shared_articles
|
||||
.where.not(id: existing_articles.to_a)
|
||||
.each { |shared_article| new_articles << shared_article.build_new_article(self) }
|
||||
.find_each { |new_shared_article| new_articles << new_shared_article.build_new_article(self) }
|
||||
end
|
||||
return [updated_article_pairs, outlisted_articles, new_articles]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue