Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Adam Pisoni
RE: next task timeout [ reply ]  
2008-06-03 23:04
Good question. I'm reusing the timeout value to determine who rapidly I should poll. You'll notice that I STILL timeout after the timeout you gave me, but I have to determine how many times and how fast to poll within that timeout. It's another consequence of using mysql as a queue.


By: Sean Jones
next task timeout [ reply ]  
2008-06-03 16:29
mysql.rb line 184 & 186

sleepy = rand(timeout * 0.5 )
sleep sleepy

Why do you do this instead of just sleeping for the full timeout interval?

Sean