Sha256: 4e53f36eea8e873587ca76a78141d0cff645f0213b6e16d954f9a81ef0e3985c

Contents?: true

Size: 746 Bytes

Versions: 39

Compression:

Stored size: 746 Bytes

Contents

module DispatchRider
  module QueueServices
    class FileSystem < Base
      class FsReceivedMessage < ReceivedMessage
        attr_reader :queue
        
        def initialize(message, item, queue)
          @queue = queue
          super(message, item)
        end
        
        def extend_timeout(timeout)
          #file system doesn't support timeouts on items, so we ignore this.
        end
        
        def return_to_queue
          queue.put_back(item)
        end

        def receive_count
          1 # can't really check that in this service
        end

        def sent_at
          @item.ctime
        end

        def queue_name
          File.basename(File.dirname(@item.path))
        end

      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
dispatch-rider-1.9.0 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.6 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.5 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.4 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.3 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.2 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.1 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.8.0 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.7.2 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.7.1 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.7.0 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.6.2 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.6.1 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.6.0 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.5.3 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.5.2 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.5.1 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.5.0 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.4.2 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb
dispatch-rider-1.4.0 lib/dispatch-rider/queue_services/file_system/fs_received_message.rb