99. capify .
set :application, quot;mey_aplicativoquot;
set :repository, quot;git://server.com/projeto.gitquot;
set :deploy_to, quot;/var/www/#{application}quot;
cap setup
default_run_options[:pty] = true
set :repository, quot;git@github.com:user/rails-app.gitquot;
set :scm, quot;gitquot;
set :scm_passphrase, quot;p00pquot;
set :user, quot;deployerquot;
cap deploy
set :branch, quot;origin/masterquot;
set :deploy_via, :remote_cache
set :git_shallow_clone, 1
set :git_enable_submodules, 1
cap rollback
138. class PostsController < Application
def action
# código lento
end
end
# http://www.site.com/posts
139. class PostsController < Application
def action PERIGO!
# código lento
end
end
# http://www.site.com/posts
140. class PostsController < Application
def action
MiddleMan.new_worker(
:class => :heavy)
end
end
class Heavy <
BackgrounDRb::Worker::RailsBase
def do_work(options)
# código lento
end
end