1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Clean up examples

This commit is contained in:
Mike Perham 2012-04-02 19:21:26 -07:00
parent 41e20588b1
commit 2e58b1d9d8
4 changed files with 10 additions and 8 deletions

View file

@ -5,5 +5,5 @@
:verbose: false
:concurrency: 25
:queues:
- [often, 2]
- [seldom, 1]
- often
- seldom

View file

@ -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

View file

@ -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

View file

@ -5,5 +5,5 @@
:pidfile: /tmp/sidekiq-config-test.pid
:concurrency: 50
:queues:
- [often, 2]
- [seldom, 1]
- often
- seldom