Sha256: 53e0952d2da261ddfc861f082b5351c4b4269be9c65c0d88d6edd8e50de93375
Contents?: true
Size: 359 Bytes
Versions: 7
Compression:
Stored size: 359 Bytes
Contents
module Jackhammer class QueueName def self.app_name Jackhammer.configuration.app_name end def self.from_routing_key(routing_key) fail(InvalidConfigError, "app_name must be set to determine queue_name from routing_key") if app_name.to_s.empty? "#{app_name}_#{routing_key}_q".gsub(/[^\w]+/, '_').squeeze('_') end end end
Version data entries
7 entries across 7 versions & 1 rubygems