Created
January 29, 2013 10:35
-
-
Save tachiba/4663371 to your computer and use it in GitHub Desktop.
god > gitlab-resuqe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app_root = "/home/gitlab/gitlabhq" | |
# SEE: https://github.com/defunkt/resque/blob/master/examples/god/resque.god | |
God.watch do |w| | |
w.name = "gitlab-resque" | |
w.interval = 30.seconds | |
w.dir = app_root | |
w.env = { | |
"QUEUE" => 'post_receive,mailer,system_hook', | |
'BUNDLE_GEMFILE' => "#{app_root}/Gemfile", | |
"RAILS_ENV" => 'production', | |
#"PIDFILE" => 'tmp/pids/resque_worker.pid', | |
#"BACKGROUND" => 'yes' | |
} | |
w.start = "bundle exec rake environment resque:work" | |
w.log = "#{app_root}/log/resque.log" | |
w.uid = 'gitlab' | |
w.gid = 'git' | |
w.start_if do |start| | |
start.condition(:process_running) do |c| | |
c.interval = 10.seconds | |
c.running = false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment