Sha256: fa69d9eedff6adfb55da904accf862a47818ef271a39cfdd7a41b142c3af313f
Contents?: true
Size: 1.6 KB
Versions: 13
Compression:
Stored size: 1.6 KB
Contents
Capistrano::Configuration.instance(:must_exist).load do namespace :slice do desc "Tail the Rails import log for this environment" task :tail_import_logs, :roles => :utility do run "tail -f #{shared_path}/log/import-#{rails_env}.log" do |channel, stream, data| puts # for an extra line break before the host name puts "#{channel[:server]} -> #{data}" break if stream == :err end end desc "Tail the Rails log for this environment" task :tail_logs, :roles => :utility do run "tail -f #{shared_path}/log/#{rails_env}.log" do |channel, stream, data| puts # for an extra line break before the host name puts "#{channel[:server]} -> #{data}" break if stream == :err end end desc <<-DESC grep the production.log to find long running queries DESC task :grep_requests, :roles => :app do run "grep 'Completed in [0-9]*' #{shared_path}/log/#{rails_env}.log" end desc <<-DESC grep the production.log to find long running queries DESC task :grep_long_requests, :roles => :app do run "grep 'Completed in [0-9][0-9]' #{shared_path}/log/#{rails_env}.log" end end # Deploy the custom maintenance page define_recipe :custom_maintenance_page do desc "Copy the maintenance page from the public directory to the shared directory" task :copy_maintenance_page, :roles => :app do upload "public/maintenance.html","#{shared_path}/system/maintenance.html.custom", :via => :scp end before "deploy:web:disable", "slice:copy_maintenance_page" end end
Version data entries
13 entries across 13 versions & 1 rubygems