Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有时在开发过程中在本地运行太多服务器可能会失控。
具有Resque(使用Redis )的 Rails 应用程序如何绕过运行 resque 的需要,并立即执行 perform 方法?
我希望能够在开发时不必一直运行这两个服务器。
只需将其添加到底部config/environments/development.rb
config/environments/development.rb
# bypass resque in the development environment if Rails.env.development? module Resque def self.enqueue(klass, *args) klass.perform(*args) end end end