Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show resque-scheduler tab in resque-web

I followed all instructions on resque-scheduler repo to show up the "Delayed" and "Schedule" tabs on the resque-web interface, but nothing!

Here's the imported gems:

gem 'resque', '~> 1.25.2', require: 'resque/server'
gem 'resque-scheduler', '~> 2.5.5'
gem 'resque-web', require: 'resque_web'

To normally add scheduler to resque-web, I edited the ./config/initializers/resque_config.rb

require 'resque'
Resque.redis = "127.0.0.1:6379" # tell Resque where redis lives
# This will "normally" make the tabs show up.
require 'resque_scheduler' # the one provided on the README doesn't exist 'resque-scheduler'
require 'resque_scheduler/server' # the one provided on the README doesn't exist 'resque/scheduler/server'

To load resque-web, I have used a rails route:

ResqueWeb::Engine.eager_load!
mount ResqueWeb::Engine => "/resque_web"

But still, no effect on resque web interface...

like image 524
Simo Avatar asked Dec 26 '22 05:12

Simo


1 Answers

There is a discussion about this in the issue tracker.

Essentially, it seems I need to use the built-in Sinatra app, not 'resque-web'. If you mount the app like this:

require 'resque/scheduler/server'
mount Resque::Server.new, :at => '/resque'

Rather than this:

mount ResqueWeb::Engine => '/resque'

...it should work.

like image 116
seb Avatar answered Jan 09 '23 02:01

seb