From 2e58b1d9d8f3f06ec8d2499238121fc2ec6b1ed6 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Mon, 2 Apr 2012 19:21:26 -0700 Subject: [PATCH] Clean up examples --- examples/config.yml | 4 ++-- examples/por.rb | 4 ++-- examples/sinkiq.rb | 6 ++++-- test/config.yml | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/config.yml b/examples/config.yml index c91c28c6..2f223137 100644 --- a/examples/config.yml +++ b/examples/config.yml @@ -5,5 +5,5 @@ :verbose: false :concurrency: 25 :queues: - - [often, 2] - - [seldom, 1] + - often + - seldom diff --git a/examples/por.rb b/examples/por.rb index 29f8fa1e..f3b53803 100644 --- a/examples/por.rb +++ b/examples/por.rb @@ -2,12 +2,12 @@ require 'sidekiq' # If your client is single-threaded, we just need a single connection in our Redis connection pool Sidekiq.configure_client do |config| - config.redis = Sidekiq::RedisConnection.create(:namespace => 'x', :size => 1, :url => 'redis://redis.host:1234/14') + config.redis = { :namespace => 'x', :size => 1, :url => 'redis://redis.host:1234/14' } end # Sidekiq server is multi-threaded so our Redis connection pool size defaults to concurrency (-c) Sidekiq.configure_server do |config| - config.redis = Sidekiq::RedisConnection.create(:namespace => 'x', :url => 'redis://redis.host:1234/14') + config.redis = { :namespace => 'x', :url => 'redis://redis.host:1234/14' } end # Start up sidekiq via diff --git a/examples/sinkiq.rb b/examples/sinkiq.rb index 9f3578df..83d95df9 100644 --- a/examples/sinkiq.rb +++ b/examples/sinkiq.rb @@ -5,8 +5,10 @@ # and then browse to http://localhost:4567 # require 'sinatra' -require 'sidekiq/worker' -$redis = Sidekiq::RedisConnection.create +require 'sidekiq' +require 'redis' + +$redis = Redis.connect class SinatraWorker include Sidekiq::Worker diff --git a/test/config.yml b/test/config.yml index 736e6fa5..74e57095 100644 --- a/test/config.yml +++ b/test/config.yml @@ -5,5 +5,5 @@ :pidfile: /tmp/sidekiq-config-test.pid :concurrency: 50 :queues: - - [often, 2] - - [seldom, 1] + - often + - seldom