Sha256: 1a6aab98e0bbdb4af63750000916413aa1fc1b7c52eb4eaad01ba84d239114e5
Contents?: true
Size: 622 Bytes
Versions: 1
Compression:
Stored size: 622 Bytes
Contents
module QPush module Web module Apis class QueueDelayed def initialize(id, score) @id = id @score = score end def call Web.redis 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.6 | lib/qpush/web/apis/queue_delayed.rb |