2

I'm trying to get hirefire to work with Heroku Cedar Stack. I tried using this patch, but that doesn't seem to help either. Workers are not getting spun up at all. Anybody here has a solution that works?

zacropetricopus
  • 407
  • 1
  • 5
  • 12

1 Answers1

1

I found the solution to this after I looked at hirefire source. The issue in my case was that there was a locked job in the job queue. Because of this, delayed_job.working turned out to be 1 and not 0. Also, because of the locked job, delayed_job.jobs was also 1. And hence no worker was hired. I cleared all the jobs from the queue and then hirefire worked like a charm.

    def hirefire_hire
      delayed_job = ::Delayed::Job.new
      if delayed_job.working == 0 \
      or delayed_job.jobs    == 1
        environment.hire
      end
    end

I think this check should be modified to check for number of jobs that are not locked or something of a similar nature.

zacropetricopus
  • 407
  • 1
  • 5
  • 12