Permalink
Browse files

Merge branch 'master' of git@github.com:infochimps/godhead

Conflicts:
	Rakefile
	godhead.gemspec
  • Loading branch information...
2 parents 3fb4404 + 15077e2 commit 8ce0b50d8e3b4a36479f8793fac058b8d1766c30 Dhruv Bansal committed Jun 18, 2010
Showing with 19 additions and 94 deletions.
  1. +2 −1 .gitignore
  2. +2 −2 README.textile
  3. +12 −1 Rakefile
  4. +1 −1 VERSION
  5. +0 −88 godhead.gemspec
  6. +2 −1 lib/godhead/recipes/unicorn_recipe.rb
View
@@ -41,4 +41,5 @@ a.out
/config/sphinx.yml
/public/stylesheets/compiled/*
/vendor/src/**/*
-*.gem
+*.gem
+*.gemspec
View
@@ -34,7 +34,7 @@ The @examples/@ directory holds:
h2. Our use case for godhead
-At infochimps, we have a lot of boxen set up as "scrapers":http://github.com/mrflip/monkeyshines and as "feed endpoints.":http://github.com/mrflip/flood_monkey These typically talk to a lightweight database of some sort, pull or push to a queue, and are controlled through a simple sinatra admin panel.
+At infochimps, we have a lot of boxen set up as "scrapers":http://github.com/infochimps/monkeyshines and as "feed endpoints.":http://github.com/mrflip/flood_monkey These typically talk to a lightweight database of some sort, pull or push to a queue, and are controlled through a simple sinatra admin panel.
With Godhead we describe the platonic form of, say, a "god config to monitor Tokyo Tyrant". The god files for a project using Tokyo Tyrant specifies only those few ways (port numbers, memory limits, etc) that its tasks differ from any other project's Tokyo Tyrant tasks. Configuration is still done in Ruby, through any combination of config params and subclassing.
@@ -47,4 +47,4 @@ h2. Links
** "god recipe":http://pastie.textmate.org/private/ovgxu2ihoicli2ktrwtbew
* "delayed_job":http://github.com/blog/229-dj-god
* "init.d/god script":http://www.johnwulff.com/2008/04/30/deploy-typo-using-capistrano
-* backgroundRb: "this one":http://effectif.com/articles/monitoring-backgroundrb-with-god - or "this one":http://blog.jonathanrwallace.com/2008/08/monitoring-backgroundrb-workers-with-god/
+* backgroundRb: "this one":http://effectif.com/articles/monitoring-backgroundrb-with-god - or "this one":http://blog.jonathanrwallace.com/2008/08/monitoring-backgroundrb-workers-with-god/
View
@@ -10,13 +10,15 @@ begin
gem.email = "coders@infochimps.org"
gem.homepage = "http://github.com/infochimps/godhead"
gem.authors = ["Philip (flip) Kromer, Dhruv Bansal, Carl Knutson"]
+ gem.add_development_dependency "yard", ">= 0"
gem.add_development_dependency "rspec"
gem.add_dependency 'god'
gem.add_dependency 'activesupport'
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
+ Jeweler::GemcutterTasks.new
rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
require 'spec/rake/spectask'
@@ -33,3 +35,12 @@ end
task :spec => :check_dependencies
task :default => :spec
+
+begin
+ require 'yard'
+ YARD::Rake::YardocTask.new
+rescue LoadError
+ task :yardoc do
+ abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
+ end
+end
View
@@ -1 +1 @@
-0.0.3
+0.0.4
View
@@ -1,88 +0,0 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = %q{godhead}
- s.version = "0.0.3"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Philip (flip) Kromer, Dhruv Bansal"]
- s.date = %q{2010-02-11}
- s.description = %q{Configure God monitored processes according to their concerns the servers (path and so forth), site policy (number, ports, etc), and notification (email groups, mailserver, etc).}
- s.email = %q{coders@infochimps.org}
- s.extra_rdoc_files = [
- "LICENSE",
- "README.textile"
- ]
- s.files = [
- ".document",
- ".gitignore",
- "LICENSE",
- "README.textile",
- "Rakefile",
- "VERSION",
- "examples/etc/god.conf",
- "examples/etc/god/god_config.yaml",
- "examples/etc/god/sample_project.god",
- "examples/etc/init.d/god",
- "godhead.gemspec",
- "lib/godhead.rb",
- "lib/godhead/extensions.rb",
- "lib/godhead/extensions/hash.rb",
- "lib/godhead/extensions/string.rb",
- "lib/godhead/god_email.rb",
- "lib/godhead/god_recipe.rb",
- "lib/godhead/mixins.rb",
- "lib/godhead/mixins/runs_as_service.rb",
- "lib/godhead/notifications.rb",
- "lib/godhead/process_groups.rb",
- "lib/godhead/recipes.rb",
- "lib/godhead/recipes/beanstalkd_recipe.rb",
- "lib/godhead/recipes/delayed_job_recipe.rb",
- "lib/godhead/recipes/generic_worker_recipe.rb",
- "lib/godhead/recipes/memcached_recipe.rb",
- "lib/godhead/recipes/mongrel_recipe.rb",
- "lib/godhead/recipes/mysql_recipe.rb",
- "lib/godhead/recipes/nginx_recipe.rb",
- "lib/godhead/recipes/resque_recipe.rb",
- "lib/godhead/recipes/starling_recipe.rb",
- "lib/godhead/recipes/thin_recipe.rb",
- "lib/godhead/recipes/thinking_sphinx.rb",
- "lib/godhead/recipes/tyrant_recipe.rb",
- "lib/godhead/recipes/unicorn_recipe.rb",
- "lib/godhead/recipes/workling_recipe.rb",
- "spec/godhead_spec.rb",
- "spec/spec_helper.rb"
- ]
- s.homepage = %q{http://github.com/infochimps/godhead}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{God recipes that separate configuration for processes, site policy and notifications; comes with many examples}
- s.test_files = [
- "spec/godhead_spec.rb",
- "spec/spec_helper.rb"
- ]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<rspec>, [">= 0"])
- s.add_runtime_dependency(%q<god>, [">= 0"])
- s.add_runtime_dependency(%q<activesupport>, [">= 0"])
- else
- s.add_dependency(%q<rspec>, [">= 0"])
- s.add_dependency(%q<god>, [">= 0"])
- s.add_dependency(%q<activesupport>, [">= 0"])
- end
- else
- s.add_dependency(%q<rspec>, [">= 0"])
- s.add_dependency(%q<god>, [">= 0"])
- s.add_dependency(%q<activesupport>, [">= 0"])
- end
-end
-
@@ -36,7 +36,8 @@ def stop_command
# # USR2 causes the master to re-create itself and spawn a new worker pool
def restart_command
- "kill -USR2 `cat #{pid_file}`"
+ old_pid_file = pid_file
+ "old_pid=`cat #{old_pid_file}`; kill -USR2 $old_pid ; sleep 4 ; kill -QUIT $old_pid"
end
end
end

0 comments on commit 8ce0b50

Please sign in to comment.