Running delayed_jobs and queue_classic parallely

46 views
Skip to first unread message

RQC22

unread,
Aug 16, 2013, 2:35:01 PM8/16/13
to queue_...@googlegroups.com
I am processing some jobs using delayed_jobs queue and some jobs using queue_classic. But when i start "bundle exec rake jobs:work QUEUE=<queue_name> ", it starts the listen on queue_classic "lib=queue-classic at=exec_sql sql="LISTEN \"<queue_name>\"" "and doesn't process any from delayed_jobs queue. delayed_jobs queue is completely ignored.  

RQC22

unread,
Aug 16, 2013, 2:55:14 PM8/16/13
to queue_...@googlegroups.com
digged into the details of delayed_jobs/lib/tasks.rb and queue_classic/lib/tasks.rb. found the issue:

digged into the details:

queue_classic/../tasks.rb:
task :environment
namespace :jobs do
  desc "Alias for qc:work"
  task :work  => "qc:work"
end

delayed_jobs/.../tasks.rb:
namespace :jobs do
  desc "Start a delayed_job worker."
  task :work => :environment_options do
    Delayed::Worker.new(@worker_options).start
  end

rake jobs:work picks up queue_classic qc:work alias => jobs:work always 

will fork and fix it.
Reply all
Reply to author
Forward
0 new messages