Skip to content

Commit

Permalink
Performance enhancement on sqs.queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Reeder committed Dec 13, 2009
1 parent 07f1d80 commit ba25b17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/sqs/right_sqs.rb
Expand Up @@ -87,8 +87,9 @@ def queues(prefix=nil)
# Aws::Sqs.queue('my_awesome_queue') #=> #<Aws::Sqs::Queue:0xb7b626e4 ... >
#
def queue(queue_name, create=true, visibility=nil)
url = @interface.queue_url_by_name(queue_name)
url = (create ? @interface.create_queue(queue_name, visibility) : nil) unless url
# url = @interface.queue_url_by_name(queue_name)
# url = (create ? @interface.create_queue(queue_name, visibility) : nil) unless url
url = @interface.create_queue(queue_name, visibility) # this returns the url even if it exists
url ? Queue.new(self, url) : nil
end

Expand Down
6 changes: 3 additions & 3 deletions lib/sqs/right_sqs_interface.rb
Expand Up @@ -38,10 +38,10 @@ module Aws
class SqsInterface < AwsBase
include AwsBaseInterface

API_VERSION = "2008-01-01"
API_VERSION = "2009-02-01"
DEFAULT_HOST = "queue.amazonaws.com"
DEFAULT_PORT = 80
DEFAULT_PROTOCOL = 'http'
DEFAULT_PORT = 443
DEFAULT_PROTOCOL = 'https'
REQUEST_TTL = 30
DEFAULT_VISIBILITY_TIMEOUT = 30

Expand Down

0 comments on commit ba25b17

Please sign in to comment.