Class: RServiceBus2::AppResourceAWSSQS
- Inherits:
-
AppResource
- Object
- AppResource
- RServiceBus2::AppResourceAWSSQS
- Defined in:
- lib/rservicebus2/appresource/awssqs.rb
Overview
AppResourceAWSDynamoDb
Instance Attribute Summary
Attributes inherited from AppResource
Instance Method Summary collapse
Methods inherited from AppResource
#_connect, #begin, #commit, #initialize, #reconnect, #resource, #rollback
Constructor Details
This class inherits a constructor from RServiceBus2::AppResource
Instance Method Details
#connect(uri) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rservicebus2/appresource/awssqs.rb', line 9 def connect(uri) queue_name = uri.path.sub('/', '') region = uri.host sts_client = Aws::STS::Client.new(region: region) caller_identity_account = sts_client.get_caller_identity.account queue_url = "https://sqs.#{region}.amazonaws.com/" \ "#{caller_identity_account}/#{queue_name}" { client: Aws::SQS::Client.new(region: region), url: queue_url } end |
#finished ⇒ Object
25 26 27 |
# File 'lib/rservicebus2/appresource/awssqs.rb', line 25 def finished RServiceBus2.rlog "#{self.class.name}. Finished" end |