Skip to content

Instantly share code, notes, and snippets.

@nambrot
Created February 16, 2012 06:45
Show Gist options
  • Save nambrot/1842737 to your computer and use it in GitHub Desktop.
Save nambrot/1842737 to your computer and use it in GitHub Desktop.
config/unicorn.rb
worker_processes 2 # amount of unicorn workers to spin up
timeout 3000
@resque_pid = nil
@resque_pid2 = nil
before_fork do |server, worker|
@resque_pid ||= spawn("bundle exec rake jobs:work")
@resque_pid2 ||= spawn("bundle exec clockwork app/clock.rb")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment