Sha256: 631e372f9da4bdb007c53ceb992c55469398af8c00dd2235ee80cd8ddf6aece0
Contents?: true
Size: 471 Bytes
Versions: 2
Compression:
Stored size: 471 Bytes
Contents
def redis_add_queues(queues) Sidekiq.redis do |redis| queues.each { |q| redis.sadd Dynamiq::QUEUE_LIST, q } end end def redis_queue_job(dynamic_queue, score, args = nil) payload = { retry: true, class: "Foo", jid: SecureRandom.hex, enqueued_at: Time.now.to_f } payload.merge! queue: dynamic_queue, score: score, args: args Sidekiq.redis do |redis| redis.zadd [Dynamiq::QUEUE_LIST, dynamic_queue].join(':'), score, payload.to_json end payload end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
dynamiq-0.1.0 | spec/support/redis.rb |
sidekiq-squelch-0.1.0 | spec/support/redis.rb |