workless icon indicating copy to clipboard operation
workless copied to clipboard

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

Open adamloving opened this issue 12 years ago • 2 comments

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

adamloving avatar Feb 27 '13 23:02 adamloving

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

lostboy avatar Aug 19 '13 12:08 lostboy

@lostboy @adamloving Should be fixed with - https://github.com/lostboy/workless/pull/75 - please merge.

holgersindbaek avatar Jan 05 '14 19:01 holgersindbaek