[Backgroundrb-devel] Strange problem with ActiveRecord#find in worker
Benjamin H. Bryant
iambenbryant at gmail.com
Fri May 23 17:07:25 EDT 2008
I had the same (very frustrating) problem. Im not entirely sure what
it's root is, but it seems to be due to mysql not having completely
finished writing/updating before your worker attempts to find the
record. Try adding a sleep(1) (or potentially even less time) in your
worker method before the find. That worked for me.
On May 23, 2008, at 5:00 PM, Ruben. D. wrote:
> Hi friends, I've a strange problem with ActiveRecord#find in a
> worker, this sometimes work fine and somethimes return Nil but the
> SQL query is fine, I don't know what happen, I was worked a complete
> day on debugging this, here is my code:
> Very thanks for your help.
> Rubén Dávila Santos.
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel