File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88
99## [ current]
10+ ### Fixed
11+ - Don't use ` foreman ` to manage multiple processes when running with ` SINGLE_DYNO=1 ` .
1012
1113
1214## [ 0.9.9.2] - 2020-09-09
Original file line number Diff line number Diff line change @@ -71,13 +71,13 @@ gem 'jquery-datatables', '~> 1.10.19'
7171gem 'grape' , '~> 1.3.2'
7272gem 'grape-entity' , '~> 0.8.0'
7373gem 'jwt' , '~> 2.2.1'
74- gem 'foreman' , '~> 0.87.1'
7574
7675group :development do
7776 gem 'bullet' , '~> 6.1.0'
7877 gem 'sqlite3' , '~> 1.4.2'
7978 gem 'better_errors' , '~> 2.7.0'
8079 gem 'binding_of_caller' , '~> 0.8.0'
80+ gem 'foreman' , '~> 0.87.1'
8181 gem 'guard' , '~> 2.16.2'
8282 gem 'guard-livereload' , '~> 2.5.2'
8383 gem 'guard-rspec' , '~> 4.7.3'
Original file line number Diff line number Diff line change @@ -40,9 +40,20 @@ if [ -z "${DO_NOT_SEED}" ]; then
4040fi
4141
4242# Start ActiveWorkflow
43+
44+ # When SINGLE_DYNO=1 run all the processes in the same container. This should
45+ # only be used for testing/demonstration purposes. SINGLE_DYNO mode was
46+ # added specifically to support running ActiveWorkflow on Heroku free plan.
47+ # Please use multiple container configuration in production.
48+
4349if [ -z " ${SINGLE_DYNO} " ]; then
4450 # Web only
4551 exec bundle exec puma
4652else
47- exec bundle exec foreman start
53+ # Simple "homegrown" process management with somewhat graceful shutdown.
54+ (until bundle exec puma; do sleep 1; done) &
55+ web_id=$!
56+ (until bundle exec rails runner bin/scheduler.rb; do sleep 1; done) &
57+ (until bundle exec script/delayed_job -n 2 run; do sleep 1; done) &
58+ wait $web_id
4859fi
You can’t perform that action at this time.
0 commit comments