Skip to content

Instantly share code, notes, and snippets.

@alhafoudh
Created March 15, 2014 00:06
Show Gist options
  • Save alhafoudh/9559646 to your computer and use it in GitHub Desktop.
Save alhafoudh/9559646 to your computer and use it in GitHub Desktop.
require 'sidetiq'
Sidekiq.configure_client do |config|
config.redis = { namespace: 'x', size: 1 }
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' }
end
class TestWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
recurrence { secondly(10) }
def perform(*args)
logger.info "Performing ::: #{Time.now}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment