I installed Resque in my rails application and everything works fine. The question I have is where the registrar installation should go. Should it be in the initializer or in the rake task? It works when configured in both. The reason why I ask, I saw how it was used as in the examples on the network.
I think that probably it should be in the initializer, since it is best to put the settings in the initializers.
config / initializers / resque.rb
logfile = File.open(File.join(Rails.root, 'log', 'resque.log'), 'a')
logfile.sync = true
Resque.logger = ActiveSupport::Logger.new(logfile)
Resque.logger.level = Logger::INFO
Then I write using the Resque.logger syntax in the task and the rake tasks.
eg:
Resque.logger.info "Resque task started!"
Thank you very much in advance.
EDIT
Then I'll stick with the initializer.
source
share