Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workers not scaled when using mongoid because pending jobs incorrectly == 0 #47

Open
adamloving opened this issue Feb 27, 2013 · 2 comments

Comments

@adamloving
Copy link
Contributor

I'm using workless with delayed_job_mongoid 2.0.0 on heroku. It seems that the scaler doesn't think it needs any workers because self.jobs.count == 0. I believe this is due to the different query syntax for mongoid and ActiveRecord. What is the best way to fix this?

      class Base
        def self.jobs
          Delayed::Job.all(:conditions => { :failed_at => nil })
        end
      end
@lostboy
Copy link
Owner

lostboy commented Aug 19, 2013

Apologies for my absence and in getting back to you. Is this still an issue you see with the latest version of the gem?

@holgersindbaek
Copy link

@lostboy @adamloving Should be fixed with - #75 - please merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants