Sha256: 0ef4855d91613ce311d02f8df7127774516e3a6d2efdd2e00431b90be12f8133
Contents?: true
Size: 618 Bytes
Versions: 1
Compression:
Stored size: 618 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(Web.keys.delay, @score, @score) delays.each # Performs a watch on our delay list # def watch_delay @conn.watch(Web.keys.delay) do yield if block_given? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
qpush-0.1.7 | lib/qpush/web/apis/queue_delayed.rb |