Improved mem usage.
This commit is contained in:
parent
f4495dc126
commit
805199880a
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ reload search index with full data
|
||||||
def search_index_reload
|
def search_index_reload
|
||||||
tolerance = 5
|
tolerance = 5
|
||||||
tolerance_count = 0
|
tolerance_count = 0
|
||||||
all.order('created_at DESC').each { |item|
|
ids = all.order('created_at DESC').pluck(:id)
|
||||||
|
ids.each { |item_id|
|
||||||
|
item = find(item_id)
|
||||||
next if item.ignore_search_indexing?(:destroy)
|
next if item.ignore_search_indexing?(:destroy)
|
||||||
begin
|
begin
|
||||||
item.search_index_update_backend
|
item.search_index_update_backend
|
||||||
|
|
Loading…
Reference in a new issue