Skip to content

Instantly share code, notes, and snippets.

@jonasschneider
Created January 14, 2013 13:36
Show Gist options
  • Save jonasschneider/4530090 to your computer and use it in GitHub Desktop.
Save jonasschneider/4530090 to your computer and use it in GitHub Desktop.
Multiprocessing on a single heroku dyno
$stdout.sync = true
loop do
puts "Process A running"
sleep 5
end
$stdout.sync = true
loop do
puts "Process B running"
sleep 5
end
source "http://rubygems.org"
GEM
remote: http://rubygems.org/
specs:
PLATFORMS
ruby
DEPENDENCIES
a: ruby a.rb
b: ruby b.rb
task "assets:precompile" do
require 'fileutils'
FileUtils.move 'Procfile', 'RealProcfile'
`gem install foreman`
File.open('Procfile', 'w') do |f|
f.write "web: foreman start -f RealProcfile"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment