Skip to content

Commit

Permalink
Note about restarting async observer. Specify port and host for beans…
Browse files Browse the repository at this point in the history
…talkd.
  • Loading branch information
topfunky committed Nov 4, 2008
1 parent ef3a2a2 commit 757acda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions recipes/peepserver_runit.rb
Expand Up @@ -49,17 +49,19 @@ def install_runit_service(service_name)
task :async_observer do
async_observer_service_path = File.join(shared_runit_service_path, "#{application}-async_observer")
run "mkdir -p #{async_observer_service_path}"

result = render_erb_template(File.dirname(__FILE__) + "/templates/runit/async_observer_worker.erb")
put result, "#{async_observer_service_path}/run", :mode => 0755
run "ln -s #{async_observer_service_path} ~/service/"
run "ln -s #{async_observer_service_path} ~/service/"

inform "Add this callback to your deploy.rb:\n\n\tafter 'deploy:restart', 'peepcode:runit:restart_async_observer'"
end

desc "Restart async-observer worker for this application"
task :restart_async_observer do
run "sv restart ~/service/#{application}-async_observer"
end

desc "Install runit task for memcache"
task :memcached do
install_runit_service("memcached")
Expand Down
2 changes: 1 addition & 1 deletion recipes/templates/runit/beanstalkd
@@ -1,4 +1,4 @@
#!/bin/sh

exec 2>&1
exec /usr/local/bin/beanstalkd
exec /usr/local/bin/beanstalkd -l 127.0.0.1 -p 11300

0 comments on commit 757acda

Please sign in to comment.