Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not showing queues of ActiveJob and tasks executed by ActiveJob #126

Open
StarWar opened this issue Apr 4, 2017 · 0 comments
Open

Not showing queues of ActiveJob and tasks executed by ActiveJob #126

StarWar opened this issue Apr 4, 2017 · 0 comments

Comments

@StarWar
Copy link

StarWar commented Apr 4, 2017

resque-web is mounted at /resque-web in routes file and I'm able to see it and on the live site on heroku as well as on my local maching, But it only has two queues one is Rollbar and other is default. It's not showing my active_job queues and and any info about working tasks and any task executed by active_job.

# resque.rb initializer
Resque.redis = Redis.current

Resque.before_fork do
  defined?(ActiveRecord::Base) &&
    ActiveRecord::Base.connection.disconnect!
end

Resque.after_fork do
  defined?(ActiveRecord::Base) &&
    ActiveRecord::Base.establish_connection
end

And

# resque.rake
require 'resque/tasks'
task 'resque:setup' => :environment

And my background_work.rb initializer

Rails.application.configure do
  config.active_job.queue_adapter = :resque
end

And my redis.rb

# frozen_string_literal: true
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
workers_count = ENV.fetch('WEB_CONCURRENCY') { 2 }.to_i
redis_size = (threads_count / 2) * workers_count
Redis.current = if ENV['REDISCLOUD_URL']
                  Redis.new(url: ENV['REDISCLOUD_URL'], size: redis_size)
                else
                  Redis.new(url: ENV['REDIS_URL'], size: redis_size)
                end

And my procfile

web: bundle exec puma -C config/puma.rb
resque: env TERM_CHILD=1 RESQUE_TERM_TIMEOUT=7 QUEUE=* bundle exec rake resque:work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant