Ruben,

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.

Ben

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:

http://pastie.caboo.se/201986

Very thanks for your help.
Regards.

--
Rubén Dávila Santos.
http://rubenonrails.com _______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel

_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel

Reply via email to