but I can't get this to work properly for the life of me.
I have several call like this
scheduler.every '15m' do
Url.update_xxxxx
end
that just go out to an rss feed and populate my db with new stories.
When I run it *without* :blocking => true, I my mysql connections slowly get used up until they hit my limit (even if I keep increasing it)
if I run it like this
scheduler.every '15m' do
Url.update_xxxxx
ActiveRecord::Base.remove_connection
end
then I get a ''ActiveRecord::ConnectionNotEstablished'" error, which persists even if I do this
scheduler.every '15m' do
ActiveRecord::Base.verify_active_connections!
Url.update_xxxxx
ActiveRecord::Base.remove_connection
end
The only way to get this to run properly is with :blocking set to true, but then I have a problem with jobs stacked on top of each other that just hogs my cpu
Any ideas?
i'm using ruby 1.8.7 with rails 2.3.11, and rufus-scheduler (2.0.10)