Created
January 16, 2014 00:47
-
-
Save troex/8447776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# automatically spin off additional services in dev mode when `rails s` started | |
if Rails.env.development? && defined?(Rails::Server) | |
puts '=> Development mode server detected, spin off additional services' | |
Thread.new do | |
puts '=> Starting Delayed::Worker' | |
Delayed::Worker.new(:quiet => true).start | |
end | |
Thread.new do | |
puts '=> Starting Clockwork' | |
require File.expand_path('../../../config/schedule.rb', __FILE__) | |
Clockwork::run | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment