Sha256: 25fc2baf8f1775081a15ec4e98899aefa33bff4b37f4d11c6f57ebaebac2e45e

Contents?: true

Size: 299 Bytes

Versions: 6

Compression:

Stored size: 299 Bytes

Contents

module Lux::DelayedJob
  module Redis
    extend self

    def que
      @server ||= Lux.config(:redis_server)
    end

    def push(list)
      que.push Marshal.dump list
    end

    def pop
      que.process(true) do |message|
        Marshal.load(message) rescue nil
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lux-fw-0.5.37 ./lib/lux/delayed_job/lib/redis.rb
lux-fw-0.5.36 ./lib/lux/delayed_job/lib/redis.rb
lux-fw-0.5.35 ./lib/lux/delayed_job/lib/redis.rb
lux-fw-0.5.34 ./lib/lux/delayed_job/lib/redis.rb
lux-fw-0.5.33 ./lib/lux/delayed_job/lib/redis.rb
lux-fw-0.5.32 ./lib/lux/delayed_job/lib/redis.rb