Sha256: 326dcb2753fca07f04208bc51095ea9f4b351d218831f98e01ee9ec51022114f
Contents?: true
Size: 580 Bytes
Versions: 22
Compression:
Stored size: 580 Bytes
Contents
module Shoryuken module Middleware module Server class AutoDelete def call(worker, queue, sqs_msg, body) yield auto_delete = worker.class.get_shoryuken_options['delete'] || worker.class.get_shoryuken_options['auto_delete'] if auto_delete entries = [sqs_msg].flatten.map.with_index do |message, i| { id: i.to_s, receipt_handle: message.receipt_handle } end Shoryuken::Client.queues(queue).delete_messages(entries: entries) end end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems