Skip to content

A platform for community discussion. Free, open, simple.

DEV: Enable Pitchfork by default (#37679)

Loïc Guitauta49b2dc46ce7
diff --git a/bin/rails b/bin/rails
index aa8b01ab7f3..a3e9676eec1 100755
--- a/bin/rails
+++ b/bin/rails
@@ -10,7 +10,7 @@ if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server") && Process.respo
ENV["RAILS_LOGS_STDOUT"] ||= "1"
- exec File.expand_path(ENV["RUN_PITCHFORK"] == "1" ? "pitchfork" : "unicorn", __dir__)
+ exec File.expand_path(ENV["RUN_PITCHFORK"] == "0" ? "unicorn" : "pitchfork", __dir__)
end
APP_PATH = File.expand_path("../config/application", __dir__)
diff --git a/config/unicorn_launcher b/config/unicorn_launcher
index 92955f53b01..7936f6c20b3 100755
--- a/config/unicorn_launcher
+++ b/config/unicorn_launcher
@@ -69,7 +69,7 @@ function on_reopenlogs() {
export UNICORN_SUPERVISOR_PID=$$
-if [[ "$RUN_PITCHFORK" == "1" ]]; then
+if [[ "$RUN_PITCHFORK" != "0" ]]; then
PITCHFORK_ARGS=()
for arg in "$@"; do
PITCHFORK_ARGS+=("${arg/unicorn.conf.rb/pitchfork.conf.rb}")
@@ -77,7 +77,7 @@ if [[ "$RUN_PITCHFORK" == "1" ]]; then
fi
trap on_exit EXIT
-if [[ "$RUN_PITCHFORK" != "1" ]]; then
+if [[ "$RUN_PITCHFORK" == "0" ]]; then
trap on_reload_unicorn USR2 HUP
trap on_reopenlogs USR1
unicorn "$@" &