Hi, thanks for your response. That's an interesting strategy but I
think using a separate job queuing system is overkill for the task I'm
trying to perform. I don't really even care how long the task I'm
performing takes, I just need it done. The point, I think, is that
mongoid should support operations that are going to take a long time.
So far since any timeout option I've been able to find raises the same
block exception, I've had to drop down to the driver level.
Unfortunately, the cursor *still* times out. My code looks along the
lines of:
def recalculate_stats!
Mongoid.database[
collection.name].find({}, :timeout => false) do
|cursor|
cursor.each do |row|
Product.new(row).do_stuff
end
end
end
Obviously this route is pretty ugly and unmaintainable, but it also
does not seem to do any good for the timeout issue. I'd honestly be ok
with just disabling all timeouts in the system. I've dug through the
documentation and hacked away as best I could with no success. I can't
imagine I'm the first mongoid user who has wanted to do something
without cursor timeouts. Any help in that direction that you guys
could provide would be greatly appreciated.