Quantcast
Channel: FeedBunch:72746f1d36ee27cbb60245a53b05a279a371e279 commits
Viewing all articles
Browse latest Browse all 38

Use find_each instead of each to update all EntryState instances during migra...

$
0
0
Trying to use "EntryState.all.each" means rails attempts to instantiate all EntryState objects, which will give an outofmemory error and the kernel will kill the ruby process. Using "EntryState.all.find_each" instead instantiates 1000 records every time, which is much less ram-intensive.

Viewing all articles
Browse latest Browse all 38

Trending Articles