Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Faye.ensure_reactor_running! in an initializer #26
Hi, I noticed your recent change to the README in which you recommended an initializer to run
Have you gotten ensure_reactor_running! working in one of your own apps?
1 similar comment
Okay. Here's the horrible way I solved this in MessageRocket:
# config/initializers/faye.rb def running_as_server? Rails.const_defined?(:Server) || defined?(::Rack::Handler::Thin) end Rails.application.config.after_initialize do unless running_as_server? Faye.ensure_reactor_running! end end