Permalink
Browse files

fix :all namespace

  • Loading branch information...
1 parent b7f1b8c commit 26600fa85a8539451eea6ad1ecae03666f070790 @jnewland committed Jun 23, 2008
Showing with 12 additions and 7 deletions.
  1. +12 −7 lib/san_juan.rb
View
@@ -13,33 +13,33 @@ def role(role, watches)
unless @meta_tasks_defined
namespace :all do
desc "Describe the status of the running tasks on each server"
- task :status, :roles => san_juan.roles do
- san_juan.roles.each { |role| send(role, :status) }
+ task :status do
+ san_juan.roles.each { |role| send(role).send(:status) }
end
desc "Start god"
task :start do
- san_juan.roles.each { |role| send(role, :start) }
+ san_juan.roles.each { |role| send(role).send(:start) }
end
desc "Reloading God Config"
task :reload do
- san_juan.roles.each { |role| send(role, :reload) }
+ san_juan.roles.each { |role| send(role).send(:reload) }
end
desc "Start god interactively"
task :start_interactive do
- san_juan.roles.each { |role| send(role, :start_interactive) }
+ san_juan.roles.each { |role| send(role).send(:start_interactive) }
end
desc "Quit god, but not the processes it's monitoring"
task :quit do
- san_juan.roles.each { |role| send(role, :quit) }
+ san_juan.roles.each { |role| send(role).send(:quit) }
end
desc "Terminate god and all monitored processes"
task :terminate do
- san_juan.roles.each { |role| send(role, :terminate) }
+ san_juan.roles.each { |role| send(role).send(:terminate) }
end
end
end
@@ -71,6 +71,11 @@ def role(role, watches)
sudo 'god terminate'
end
+ desc "Describe the status of the running tasks"
+ task :status, :roles => role do
+ sudo 'god status'
+ end
+
watches.each do |watch|
namespace watch do
%w(start restart stop unmonitor remove log).each do |command|

0 comments on commit 26600fa

Please sign in to comment.