1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Kill the "deploy:app" namespace and move those tasks into deploy, directly.

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2007-05-08 04:49:07 +00:00
parent 845f0d2ca6
commit 2b5d913ff0
3 changed files with 38 additions and 38 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Kill the "deploy:app" namespace and move those tasks into deploy, directly. [Jamis Buck]
* Make sure 'desc' applies to the next defined task, in any namespace. [Jamis Buck]
* Fix shell so that servers for a task are correctly discovered. [Jamis Buck]

View file

@ -24,9 +24,9 @@ map.each do |old, new|
end"
end
desc "DEPRECATED: See deploy:app:start."
desc "DEPRECATED: See deploy:start."
task :spinner do
warn "[DEPRECATED] `spinner' is deprecated. Use `deploy:app:start' instead."
warn "[DEPRECATED] `spinner' is deprecated. Use `deploy:start' instead."
set :runner, fetch(:spinner_user, "app")
deploy.app.start
deploy.start
end

View file

@ -348,51 +348,49 @@ namespace :deploy do
deployed your application before, or if your application is (for some \
other reason) not currently running. It will deploy the code, run any \
pending migrations, and then instead of invoking `deploy:restart', it will
invoke `deploy:app:start' to fire up the application servers.
invoke `deploy:start' to fire up the application servers.
DESC
task :cold do
update
migrate
app.start
start
end
namespace :app do
desc <<-DESC
Start the application servers. This will attempt to invoke a script \
in your application called `script/spin', which must know how to start \
your application listeners. For Rails applications, you might just have \
that script invoke `script/process/spawner' with the appropriate \
arguments.
desc <<-DESC
Start the application servers. This will attempt to invoke a script \
in your application called `script/spin', which must know how to start \
your application listeners. For Rails applications, you might just have \
that script invoke `script/process/spawner' with the appropriate \
arguments.
By default, the script will be executed via sudo as the `app' user. If \
you wish to run it as a different user, set the :runner variable to \
that user. If you are in an environment where you can't use sudo, set \
the :use_sudo variable to false.
DESC
task :start, :roles => :app do
as = fetch(:runner, "app")
via = fetch(:run_method, :sudo)
invoke_command "sh -c 'cd #{current_path} && nohup script/spin'", :via => via, :as => as
end
By default, the script will be executed via sudo as the `app' user. If \
you wish to run it as a different user, set the :runner variable to \
that user. If you are in an environment where you can't use sudo, set \
the :use_sudo variable to false.
DESC
task :start, :roles => :app do
as = fetch(:runner, "app")
via = fetch(:run_method, :sudo)
invoke_command "sh -c 'cd #{current_path} && nohup script/spin'", :via => via, :as => as
end
desc <<-DESC
Stop the application servers. This will call script/process/reaper for \
both the spawner process, and all of the application processes it has \
spawned. As such, it is fairly Rails specific and may need to be \
overridden for other systems.
desc <<-DESC
Stop the application servers. This will call script/process/reaper for \
both the spawner process, and all of the application processes it has \
spawned. As such, it is fairly Rails specific and may need to be \
overridden for other systems.
By default, the script will be executed via sudo as the `app' user. If \
you wish to run it as a different user, set the :runner variable to \
that user. If you are in an environment where you can't use sudo, set \
the :use_sudo variable to false.
DESC
task :stop, :roles => :app do
as = fetch(:runner, "app")
via = fetch(:run_method, :sudo)
By default, the script will be executed via sudo as the `app' user. If \
you wish to run it as a different user, set the :runner variable to \
that user. If you are in an environment where you can't use sudo, set \
the :use_sudo variable to false.
DESC
task :stop, :roles => :app do
as = fetch(:runner, "app")
via = fetch(:run_method, :sudo)
invoke_command "#{current_path}/script/process/reaper -a kill -r dispatch.spawner.pid", :via => via, :as => as
invoke_command "#{current_path}/script/process/reaper -a kill", :via => via, :as => as
end
invoke_command "#{current_path}/script/process/reaper -a kill -r dispatch.spawner.pid", :via => via, :as => as
invoke_command "#{current_path}/script/process/reaper -a kill", :via => via, :as => as
end
namespace :pending do