Sha256: d5ca138ee647da958baa41e2b641776abf4657082bedc81dc348508d86ef4f0a
Contents?: true
Size: 729 Bytes
Versions: 9
Compression:
Stored size: 729 Bytes
Contents
require "aws/sqs" module DaemonKit # Thin wrapper around the aws-sdk gem, specifically designed to ease # configuration of the SQS client class SQS @@instance = nil class << self def instance @instance ||= new end private :new def run(config = {}, &block) instance.run(config, &block) end end def initialize @config = DaemonKit::Config.load("sqs").to_h(true) end def run(config = {}, &block) sqs_config = @config.merge(config) DaemonKit.logger.debug("AWS::SQS.new(#{sqs_config.inspect})") sqs = ::AWS::SQS.new(sqs_config) DaemonKit.logger.debug("# => #{sqs.client.inspect}") block.call(sqs) end end end
Version data entries
9 entries across 9 versions & 1 rubygems