From f9f490e95711f30aa760df1a483fcb7f2002df39 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Aug 2018 10:01:44 +1000 Subject: [PATCH] DEV: bin/unicorn -x to run without sidekiq --- bin/unicorn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bin/unicorn b/bin/unicorn index 80f3cca452e..a425691870d 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -25,8 +25,24 @@ if !ARGV.include?("-E") && end ENV["UNICORN_PORT"] ||= "9292" + + if ARGV.delete("-x") + puts "Running without sidekiq" + ENV["UNICORN_SIDEKIQS"] = "0" + end + ENV["UNICORN_SIDEKIQS"] ||= "1" end +if ARGV.include?("--help") + fork do + load Gem.bin_path('unicorn', 'unicorn') + end + Process.wait + puts "Extra Discourse Options:" + puts " -x run without sidekiq" + exit +end + load Gem.bin_path('unicorn', 'unicorn')