Sha256: 17bd5de579fa3da728b83fe1c789f54426e58dac4b54481cbfbb614d56699e96

Contents?: true

Size: 766 Bytes

Versions: 3

Compression:

Stored size: 766 Bytes

Contents

module Qs

  class RedisItem

    attr_reader :queue_redis_key, :serialized_payload
    attr_accessor :started, :finished
    attr_accessor :job, :handler_class
    attr_accessor :exception, :time_taken

    def initialize(queue_redis_key, serialized_payload)
      @queue_redis_key    = queue_redis_key
      @serialized_payload = serialized_payload
      @started            = false
      @finished           = false

      @job           = nil
      @handler_class = nil
      @exception     = nil
      @time_taken    = nil
    end

    def ==(other)
      if other.kind_of?(self.class)
        self.queue_redis_key    == other.queue_redis_key &&
        self.serialized_payload == other.serialized_payload
      else
        super
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qs-0.3.0 lib/qs/redis_item.rb
qs-0.2.0 lib/qs/redis_item.rb
qs-0.1.0 lib/qs/redis_item.rb