class AdvancedSneakersActiveJob::Configuration
Advanced Sneakers
adapter allows to patch Sneakers
with custom configuration. It is useful when already have Sneakers
workers running and you want to run ActiveJob
Sneakers
process with another options.
Constants
- DEFAULT_SNEAKERS_CONFIG
Public Instance Methods
publisher_config()
click to toggle source
# File lib/advanced_sneakers_activejob/configuration.rb, line 40 def publisher_config sneakers.merge(publish_connection: publish_connection) end
republish_connection=(_)
click to toggle source
# File lib/advanced_sneakers_activejob/configuration.rb, line 22 def republish_connection=(_) ActiveSupport::Deprecation.warn('Republish connection is not used for bunny-publisher v0.2+') end
sneakers()
click to toggle source
# File lib/advanced_sneakers_activejob/configuration.rb, line 26 def sneakers custom_config = DEFAULT_SNEAKERS_CONFIG.deep_merge(config.sneakers || {}) if custom_config[:amqp].present? & custom_config[:vhost].nil? custom_config[:vhost] = AMQ::Settings.parse_amqp_url(custom_config[:amqp]).fetch(:vhost, '/') end Sneakers::CONFIG.to_hash.deep_merge(custom_config) end
sneakers=(custom)
click to toggle source
# File lib/advanced_sneakers_activejob/configuration.rb, line 36 def sneakers=(custom) config.sneakers = custom end