Skip to content

Instantly share code, notes, and snippets.

@ivar
Forked from jonasschneider/Gemfile
Created January 18, 2018 00:46
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 ivar/068dd19176bbc5f843143c93957612e7 to your computer and use it in GitHub Desktop.
Save ivar/068dd19176bbc5f843143c93957612e7 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