nesquena / backburner

Simple and reliable beanstalkd job queue for ruby
http://nesquena.github.com/backburner
MIT License
428 stars 68 forks source link

Closed connection when creating a job from within a job of the same class #106

Closed funkyboy closed 9 years ago

funkyboy commented 9 years ago
class MyJob
  def self.perform (page)
    # does something with page
    Backburner.enqueue(MyJob, page+1) # -> 'Connection to beanstalk '127.0.0.1:11300' is closed!'
  end
end

Any idea of why? Or any suggestion on how to 'perpetuate' a job of the same class with a different parameter?

funkyboy commented 9 years ago

CORRECTION: Does NOT work even if I create a job of a different class

class MyJob
  def self.perform (page)
    # does something with page
    Backburner.enqueue(MyOtherJob, page+1) # -> 'Connection to beanstalk '127.0.0.1:11300' is closed!'
  end
end
funkyboy commented 9 years ago

Will try to create the new job in the success hook and see how it goes.

funkyboy commented 9 years ago

Never mind. Was an issue with a proxy.