Skip to content

Commit

Permalink
fix syntax bug + local start
Browse files Browse the repository at this point in the history
#121 double ; make a syntax error
sosedoff#40 try to execute unicorn in a local context
  • Loading branch information
flo-ruby-shanghai committed Nov 6, 2013
1 parent f4a81a1 commit 31e3ac7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/capistrano/tasks/unicorn.cap
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ namespace :load do
set :unicorn_config_stage_file_path, Proc.new{ File.join(fetch(:app_path), fetch(:unicorn_config_stage_rel_file_path)) }
set :unicorn_default_pid , Proc.new{ File.join(fetch(:app_path), 'tmp', 'pids', 'unicorn.pid') }
set :unicorn_pid, Proc.new{
extracted_pid = extract_pid_file
if extracted_pid
extracted_pid
else
# TODO logger is not defined
#logger.important "err :: failed to auto-detect pid from #{local_unicorn_config}"
#logger.important "err :: falling back to default: #{unicorn_default_pid}"
fetch :unicorn_default_pid
end
fetch :unicorn_default_pid
}
end
end
Expand Down Expand Up @@ -126,7 +118,7 @@ namespace :unicorn do
desc 'Reload Unicorn'
task :reload do
on roles unicorn_roles, :except => {:no_release => true} do
execute "if #{unicorn_is_running?}; then #{unicorn_send_signal('HUP')}; else #{start_unicorn}; fi;"
execute "if #{unicorn_is_running?}; then #{unicorn_send_signal('HUP')}; else #{start_unicorn} fi;"
# run <<-END
# if #{unicorn_is_running?}; then
# echo "Reloading Unicorn...";
Expand Down

0 comments on commit 31e3ac7

Please sign in to comment.