mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Remove namespace/server CLI options, #61
This commit is contained in:
parent
230853405c
commit
182bf1d5a1
4 changed files with 5 additions and 19 deletions
|
@ -13,7 +13,6 @@ require 'yaml'
|
|||
require 'optparse'
|
||||
require 'sidekiq'
|
||||
require 'sidekiq/util'
|
||||
require 'sidekiq/redis_connection'
|
||||
require 'sidekiq/manager'
|
||||
|
||||
module Sidekiq
|
||||
|
@ -42,7 +41,6 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def run
|
||||
Sidekiq.redis ||= RedisConnection.create(:url => options[:server], :namespace => options[:namespace])
|
||||
manager = Sidekiq::Manager.new(options)
|
||||
begin
|
||||
logger.info 'Starting processing, hit Ctrl-C to stop'
|
||||
|
@ -113,12 +111,12 @@ module Sidekiq
|
|||
set_logger_level_to_debug
|
||||
end
|
||||
|
||||
o.on "-n", "--namespace NAMESPACE", "namespace worker queues are under" do |arg|
|
||||
opts[:namespace] = arg
|
||||
o.on "-n", "--namespace NAMESPACE", "namespace worker queues are under (DEPRECATED)" do |arg|
|
||||
puts "Namespace support has been removed, see https://github.com/mperham/sidekiq/issues/61"
|
||||
end
|
||||
|
||||
o.on "-s", "--server LOCATION", "Where to find Redis" do |arg|
|
||||
opts[:server] = arg
|
||||
o.on "-s", "--server LOCATION", "Where to find Redis (DEPRECATED)" do |arg|
|
||||
puts "Server location support has been removed, see https://github.com/mperham/sidekiq/issues/61"
|
||||
end
|
||||
|
||||
o.on '-e', '--environment ENV', "Application environment" do |arg|
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
---
|
||||
:verbose: false
|
||||
:namespace: test_namespace
|
||||
:server: 127.0.0.1:1234
|
||||
:environment: xzibit
|
||||
:require: ./test/fake_env.rb
|
||||
:pidfile: /tmp/sidekiq-config-test.pid
|
||||
|
|
|
@ -70,10 +70,6 @@ class TestCli < MiniTest::Unit::TestCase
|
|||
refute Sidekiq.options[:verbose]
|
||||
end
|
||||
|
||||
it 'sets namespace' do
|
||||
assert_equal "test_namespace", Sidekiq.options[:namespace]
|
||||
end
|
||||
|
||||
it 'sets require file' do
|
||||
assert_equal './test/fake_env.rb', Sidekiq.options[:require]
|
||||
end
|
||||
|
@ -110,7 +106,6 @@ class TestCli < MiniTest::Unit::TestCase
|
|||
|
||||
@cli.parse(['sidekiq',
|
||||
'-C', './test/config.yml',
|
||||
'-n', 'sweet_story_bro',
|
||||
'-e', 'snoop',
|
||||
'-c', '100',
|
||||
'-r', @tmp_lib_path,
|
||||
|
@ -128,10 +123,6 @@ class TestCli < MiniTest::Unit::TestCase
|
|||
assert_equal 100, Sidekiq.options[:concurrency]
|
||||
end
|
||||
|
||||
it 'uses namespace flag' do
|
||||
assert_equal "sweet_story_bro", Sidekiq.options[:namespace]
|
||||
end
|
||||
|
||||
it 'uses require file flag' do
|
||||
assert_equal @tmp_lib_path, Sidekiq.options[:require]
|
||||
end
|
||||
|
|
|
@ -37,7 +37,6 @@ class TestProcessor < MiniTest::Unit::TestCase
|
|||
@boss.verify
|
||||
assert_equal 0, $invokes
|
||||
assert_equal 1, $errors.size
|
||||
assert_equal "RuntimeError", $errors[0][:error_class]
|
||||
assert_equal msg, $errors[0][:parameters]
|
||||
end
|
||||
|
||||
|
@ -45,7 +44,7 @@ class TestProcessor < MiniTest::Unit::TestCase
|
|||
end
|
||||
|
||||
class FakeAirbrake
|
||||
def self.notify(hash)
|
||||
def self.notify(ex, hash)
|
||||
$errors << hash
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue