Oops, that code should have been…
maxcount = Order.count
(0…maxcount).step(100) { |i|
transaction do
orders = Order.find(:all, :limit => 100, :offset => i)
## Then do processing here
end
}
Oops, that code should have been…
maxcount = Order.count
(0…maxcount).step(100) { |i|
transaction do
orders = Order.find(:all, :limit => 100, :offset => i)
## Then do processing here
end
}
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs