From 4efee230674d3b98259ace64bb9667ce5907bd1f Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Sat, 22 Mar 2014 14:41:53 -0700 Subject: [PATCH] Cant print banner before booting app or it breaks Pro's banner override --- lib/sidekiq/cli.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/sidekiq/cli.rb b/lib/sidekiq/cli.rb index c227e692..3078125c 100644 --- a/lib/sidekiq/cli.rb +++ b/lib/sidekiq/cli.rb @@ -43,6 +43,13 @@ module Sidekiq end def run + # Print logo and banner for development + if environment == 'development' && $stdout.tty? + puts "\e[#{31}m" + puts Sidekiq::BANNER + puts "\e[0m" + end + self_read, self_write = IO.pipe %w(INT TERM USR1 USR2 TTIN).each do |sig| @@ -210,13 +217,6 @@ module Sidekiq raise ArgumentError, "#{options[:require]} does not exist" unless File.exist?(options[:require]) - # Print logo and banner for development - if environment == 'development' && $stdout.tty? - puts "\e[#{31}m" - puts Sidekiq::BANNER - puts "\e[0m" - end - if File.directory?(options[:require]) require 'rails' require 'sidekiq/rails'