Sha256: 4ec64343a5161816aa0aaedceb4e74a1e0fb79daadecbe6621690b03dc66595a
Contents?: true
Size: 629 Bytes
Versions: 1
Compression:
Stored size: 629 Bytes
Contents
module QPush module Web module Apis class QueueDelayed def initialize(id, score) @id = id @score = score end def call QPush.redis.with do |conn| @conn = conn watch_delay { retrieve_delay } end end private def retrieve_delay delays = @conn.zrangebyscore(QPush.keys.delay, @score, @score) delays.each # Performs a watch on our delay list # def watch_delay @conn.watch(QPush.keys.delay) do yield if block_given? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
qpush-0.1.4 | lib/qpush/web/apis/queue_delayed.rb |