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

Don't read correctly Resque::Scheduler.dynamic #8

Open
ciaoben opened this issue Jun 9, 2016 · 1 comment
Open

Don't read correctly Resque::Scheduler.dynamic #8

ciaoben opened this issue Jun 9, 2016 · 1 comment

Comments

@ciaoben
Copy link

ciaoben commented Jun 9, 2016

I have simply installed the gem as the README says, and this is my configuration of Resque::Schedule

task "resque:setup_schedule" => "resque:setup" do
  require 'resque-scheduler'
  Resque::Scheduler.dynamic = true
end

task "resque:scheduler" => "resque:setup_schedule"

But resque-scheduler-web behaves like Resque::Scheduler is not set on dynamic. Looking at the code I see the it read the Resque::Scheduler.dynamic (for example in the index view of the scheduler page), and in my case it reads it as it is false. But scheduler is set up correctly, I can see that it dynamically schedules the jobs.

Why scheduler-web can't read it right? What it could be?

@ciaoben
Copy link
Author

ciaoben commented Jun 9, 2016

As you can see here, when using a dynamic scheduler with a rails application, it is needed to set Resque::Scheduler.dynamic in the initializers of the rails app.

I know this gem is not designed to be used only on rails, but I think that it should be a pretty common use case, maybe it is worth mentioning in the README

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