Skip to content

Instantly share code, notes, and snippets.

@tachiba
Created January 29, 2013 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tachiba/4663371 to your computer and use it in GitHub Desktop.
Save tachiba/4663371 to your computer and use it in GitHub Desktop.
god > gitlab-resuqe
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