From f44a05d547c837e490ac96c0d73a1d14f57378b6 Mon Sep 17 00:00:00 2001 From: Will Farrington Date: Fri, 25 Mar 2011 11:24:33 -0400 Subject: [PATCH] More documentation. --- README.rdoc | 19 ++++++++++--------- .../moonshine_resque_god_generator.rb | 16 +++++++++++++++- .../moonshine_resque_god_generator.rb | 16 ++++++++++++++++ 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/README.rdoc b/README.rdoc index 6071d77..d3077c8 100644 --- a/README.rdoc +++ b/README.rdoc @@ -46,21 +46,22 @@ Modify the configuration file (config/god/resque.god) as needed. You'll also want to add the `:resque` role to all servers using it. For example: - # config/deploy/production.rb - server 'worker1.myapp.com', :app, :resque + # config/deploy/production.rb + server 'worker1.myapp.com', :app, :resque If you're using Resque with God this way, you also have access to some Capistrano tasks: - cap god:resque:restart # restart resque - cap god:resque:start # start resque - cap god:resque:stop # stop resque - cap god:resque:status # show status of resque + cap god:resque:restart # restart resque + cap god:resque:start # start resque + cap god:resque:stop # stop resque + cap god:resque:status # show status of resque -We also recommend having Moonshine automatically restart Resque on deploys: +We also strongly recommend having Moonshine automatically restart Resque on +deploys: - # config/deploy.rb - before 'god:restart', 'god:resque:stop' + # config/deploy.rb + before 'god:restart', 'god:resque:stop' This is a great way to handle automatically reloading new app code into your workers on deploy, as well as increasing or decreasing the number of diff --git a/generators/moonshine_resque_god/moonshine_resque_god_generator.rb b/generators/moonshine_resque_god/moonshine_resque_god_generator.rb index 5cb1d76..5787455 100644 --- a/generators/moonshine_resque_god/moonshine_resque_god_generator.rb +++ b/generators/moonshine_resque_god/moonshine_resque_god_generator.rb @@ -6,11 +6,25 @@ def manifest intro = <<-INTRO - - To monitor Resque with God, install moonshine_god. script/plugin install git://github.com/railsmachine/moonshine_god.git +You'll also want to add the `:resque` role to all servers using it. +For example: + + # config/deploy/production.rb + server 'worker1.myapp.com', :app, :resque + +We also strongly recommend having Moonshine automatically restart Resque on +deploys: + + # config/deploy.rb + before 'god:restart', 'god:resque:stop' + +This is a great way to handle automatically reloading new app code into your +workers on deploy, as well as increasing or decreasing the number of +Resque workers. INTRO diff --git a/lib/generators/moonshine_resque_god/moonshine_resque_god_generator.rb b/lib/generators/moonshine_resque_god/moonshine_resque_god_generator.rb index fadf6a8..65a7bbd 100644 --- a/lib/generators/moonshine_resque_god/moonshine_resque_god_generator.rb +++ b/lib/generators/moonshine_resque_god/moonshine_resque_god_generator.rb @@ -16,6 +16,22 @@ def manifest script/plugin install git://github.com/railsmachine/moonshine_god.git +You'll also want to add the `:resque` role to all servers using it. +For example: + + # config/deploy/production.rb + server 'worker1.myapp.com', :app, :resque + +We also strongly recommend having Moonshine automatically restart Resque on +deploys: + + # config/deploy.rb + before 'god:restart', 'god:resque:stop' + +This is a great way to handle automatically reloading new app code into your +workers on deploy, as well as increasing or decreasing the number of +Resque workers. + INTRO puts intro