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

add resque web compatability middleware

This commit is contained in:
Max Spransy 2012-02-09 11:25:24 -06:00
parent 78aad94817
commit 8caa3ee950
2 changed files with 19 additions and 0 deletions

View file

@ -3,6 +3,7 @@ require 'redis'
require 'sidekiq/redis_connection'
require 'sidekiq/middleware/chain'
require 'sidekiq/middleware/client/resque_web_compatability'
require 'sidekiq/middleware/client/unique_jobs'
module Sidekiq

View file

@ -0,0 +1,18 @@
module Sidekiq
module Middleware
module Client
class ResqueWebCompatability
def initialize(redis)
@redis = redis
end
#Add job queue to list of queues resque web displays
def call(item, queue)
@redis.sadd('queues', queue)
yield
end
end
end
end
end