lib/legion/transport/queue.rb in legion-transport-1.0.0 vs lib/legion/transport/queue.rb in legion-transport-1.1.0
- old
+ new
@@ -23,21 +23,23 @@
hash = {}
hash[:manual_ack] = true
hash[:durable] = true
hash[:exclusive] = false
hash[:block] = false
- hash[:auto_delete] = false
- hash[:arguments] = { 'x-max-priority': 255,
- 'x-overflow': 'reject-publish',
- 'x-dead-letter-exchange': "#{self.class.ancestors.first.to_s.split('::')[2].downcase}.dlx" }
+ hash[:auto_delete] = true
+ hash[:arguments] = {
+ 'x-max-priority': 255,
+ 'x-overflow': 'reject-publish',
+ 'x-dead-letter-exchange': "#{self.class.ancestors.first.to_s.split('::')[2].downcase}.dlx"
+ }
hash
end
def queue_options
{}
end
- def queue_name
+ def queue_name # rubocop:disable Metrics/AbcSize
ancestor = self.class.ancestors.first.to_s.split('::')
name = if ancestor[5].scan(/[A-Z]/).length > 1
ancestor[5].gsub!(/(.)([A-Z])/, '\1_\2').downcase!
else
ancestor[5].downcase!