forked from livingsocial/resque-web
-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels