Sha256: 18a94bdba562661cb23e0315126d7a6b8baf6e4e16f54442008f564c4fe118a5

Contents?: true

Size: 740 Bytes

Versions: 8

Compression:

Stored size: 740 Bytes

Contents

module Qs

  class QueueItem

    attr_reader :queue_redis_key, :encoded_payload
    attr_accessor :started, :finished
    attr_accessor :message, :handler_class
    attr_accessor :exception, :time_taken

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

      @message       = 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.encoded_payload == other.encoded_payload
      else
        super
      end
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
qs-0.8.1 lib/qs/queue_item.rb
qs-0.8.0 lib/qs/queue_item.rb
qs-0.7.1 lib/qs/queue_item.rb
qs-0.7.0 lib/qs/queue_item.rb
qs-0.6.1 lib/qs/queue_item.rb
qs-0.6.0 lib/qs/queue_item.rb
qs-0.5.0 lib/qs/queue_item.rb
qs-0.4.0 lib/qs/queue_item.rb