Skip to content

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

@adamloving

Description

@adamloving

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions