Jobs magically disappear from queue (delayed_job mongoid 2 on heroku)

Posted by Hayk Saakian on Stack Overflow See other posts from Stack Overflow or by Hayk Saakian
Published on 2012-10-19T02:11:45Z Indexed on 2012/10/20 23:01 UTC
Read the original article Hit count: 177

lets say i do something like

arrs = Article.where(:body => nil)

i'll have arrs.count is let's say 900 and i do

arrs.each do |ar|
  ar.delay.download_via_diffbot #a method that takes some time, does some http, and writes a non-nil value to ar.body
end

now i'll watch the logs, and a wait a few minutes on ~5 dynos do the jobs, and do a count again: arrs.count is now ~800

so wtf, i thought i just told my workers to do ~900 jobs, what happened to the other 800?

i can confirm that i'm only making ~100 HTTP requests b/c the api reporting shows me this, also simply watching the logs is telling enough that 900 jobs are not happening.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby