Eric Lin
2009-Mar-19 19:53 UTC
[Backgroundrb-devel] Reload ActiveRecord before calling worker?
I recently ran into a problem where BackgroundDRb would get stuck on a request invoked like this: class SomeModel < ActiveRecord::Base .. def start_work update_attribute(:state, ''working'') MiddleMan.worker(:some_worker).async_do_work(:arg => { :some_model => self }) end ... end What seems to be causing the problem is the call to update_attribute before worker is called. But if I insert a "self.reload" between those two calls, it works. Does this sound familiar to anyone? Eric