2012-03-05 23:53:14 -05:00
|
|
|
require 'sidekiq'
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
|
|
|
config.redis = { :size => 1 }
|
|
|
|
end
|
|
|
|
|
2012-03-29 23:55:16 -04:00
|
|
|
#Sidekiq.redis {|conn| conn.flushdb }
|
|
|
|
#10.times do |idx|
|
|
|
|
#Sidekiq::Client.push('class' => 'HardWorker', 'args' => ['foo', 0.1, idx])
|
|
|
|
#end
|
|
|
|
|
|
|
|
#Sidekiq.redis { |conn| conn.zadd('retry', Time.now.utc.to_f + 3000, MultiJson.encode({
|
|
|
|
#'class' => 'HardWorker', 'args' => ['foo', 0.1, Time.now.to_f],
|
|
|
|
#'queue' => 'default', 'error_message' => 'No such method', 'error_class' => 'NoMethodError',
|
2014-02-09 18:08:21 -05:00
|
|
|
#'failed_at' => Time.now.to_i, 'retry_count' => 0 })) }
|
2012-03-29 23:55:16 -04:00
|
|
|
|
2012-03-05 23:53:14 -05:00
|
|
|
require 'sidekiq/web'
|
|
|
|
run Sidekiq::Web
|