Afsanefda
Afsanefda

Reputation: 3339

Rails Job Doesn't Proceed after rails jobs:work

I have a job in my rails app which I was running it before like a charm with this command:

rails jobs:work

but it doesn't proceed any longer.I killed the processes and tried a lot of solutions but nothing happened! What I guess is that this job has generated a queue so that it can not be running any more! Could you please help me? Thanks in advance. It stops in this situation :

bundle exec rake jobs:work
[Worker(host:afsane pid:7517)] Starting job worker

and my job :

class LdapSyncJob < ApplicationJob
  queue_as :default
  require 'pp'
  def perform
   ....
  end
end

FYI

ps aux | grep rails

afsane    7675  0.0  0.0  15764   968 pts/5    S+   15:24   0:00 grep --color=auto rails

Upvotes: 0

Views: 1779

Answers (1)

Aniket Rao
Aniket Rao

Reputation: 778

Try bundle exec rake jobs:workoff

This will start a job worker and exit when all available jobs are complete.

Let me know if this helps!

Upvotes: 1

Related Questions