94.
Batches of find_each
/lib/tasks/long_running_task.rake
Not so good if you have millions of tweets
desc 'Task involving all tweets'
task :tweet_task => :environment do
Tweet.all.each do |tweet|
p "task for #{tweet}"
end
end
LEVEL 4 Model Bert
94

95.
Batches of find_each
/lib/tasks/long_running_task.rake
desc 'Task involving all tweets'
task :tweet_task => :environment do
Tweet each do |tweet|
p "task for #{tweet}"
end
end
.find_
pulls batches of 1,000 at a time
LEVEL 4 Model Bert
95