module MagicPipe
docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS.html docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Client.html
Constants
- VERSION
Public Class Methods
build(&block)
click to toggle source
# File lib/magic_pipe.rb, line 34 def build(&block) unless block_given? raise ConfigurationError, "No configuration block provided." end config = Config.new(&block) client = Client.new(config) store_client(client) client end
clear_clients()
click to toggle source
# File lib/magic_pipe.rb, line 30 def clear_clients @store = {} end
lookup_client(name)
click to toggle source
# File lib/magic_pipe.rb, line 18 def lookup_client(name) @store[name.to_sym] end
store_client(client)
click to toggle source
All this should be loaded before Sidekiq or Puma start forking threads.
# File lib/magic_pipe.rb, line 25 def store_client(client) @store ||= {} @store[client.name.to_sym] = client end