Sha256: 12b2836411df48ec3ab02aa6584dfe9ecd8e9399884dcfc5983cfc12fca47ca2
Contents?: true
Size: 831 Bytes
Versions: 43
Compression:
Stored size: 831 Bytes
Contents
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 = { :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 = { :namespace => 'x', :url => 'redis://redis.host:1234/14' } end # Start up sidekiq via # ./bin/sidekiq -r ./examples/por.rb # and then you can open up an IRB session like so: # irb -r ./examples/por.rb # where you can then say # PlainOldRuby.perform_async "like a dog", 3 # class PlainOldRuby include Sidekiq::Worker def perform(how_hard="super hard", how_long=1) sleep how_long puts "Workin' #{how_hard}" end end
Version data entries
43 entries across 43 versions & 2 rubygems