Created
March 15, 2014 00:06
-
-
Save alhafoudh/9559646 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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