Class: FIFO::QueueManager
- Inherits:
-
Object
- Object
- FIFO::QueueManager
- Defined in:
- lib/fifo/queue_manager.rb
Class Method Summary collapse
-
.fetch(name, visibility) ⇒ Object
Public.
-
.setup(aws_access_id, aws_secret_key, connection_mode = :single) ⇒ Object
Public.
Class Method Details
.fetch(name, visibility) ⇒ Object
Public. Open a connection and fetch an Aws::Sqs::Queue.
Returns the Aws::Sqs::Queue.
22 23 24 |
# File 'lib/fifo/queue_manager.rb', line 22 def self.fetch(name,visibility) Aws::Sqs::Queue.create(sqs,name,true,visibility) end |
.setup(aws_access_id, aws_secret_key, connection_mode = :single) ⇒ Object
Public. Setup AWS credentials and connection_mode for the service.
aws_access_id - The String AWS access id. aws_secret_key - The String AWS secret key. connection_mode - The Symbol for threading options -
:single,:per_thread,:per_request.
See: https://github.com/appoxy/aws/ (default: :single)
13 14 15 16 17 |
# File 'lib/fifo/queue_manager.rb', line 13 def self.setup(aws_access_id,aws_secret_key,connection_mode=:single) @aws_access_id = aws_access_id @aws_secret_key = aws_secret_key @connection_mode = connection_mode end |