lib/aws/simple_workflow/client.rb in aws-sdk-1.12.0 vs lib/aws/simple_workflow/client.rb in aws-sdk-1.13.0
- old
+ new
@@ -15,10 +15,12 @@
class SimpleWorkflow
# Client class for Amazon Simple Workflow Service (SWF).
class Client < Core::JSONClient
+ API_VERSION = '2012-01-25'
+
# @api private
CACHEABLE_REQUESTS = Set[
:count_pending_activity_tasks,
:count_pending_decision_tasks,
:count_closed_workflow_executions,
@@ -34,10 +36,32 @@
:list_closed_workfow_executions,
:list_open_workfow_executions,
:list_workfow_types,
]
+ protected
+
+ def cacheable_request? name, options
+ if name == :poll_for_decision_task
+ options.keys.include?(:next_page_token)
+ else
+ self.class::CACHEABLE_REQUESTS.include?(name)
+ end
+ end
+
+ def build_request *args
+ request = super(*args)
+ if request.headers['x-amz-target'] =~ /PollFor(Decision|Activity)Task/
+ request.read_timeout = 90
+ end
+ request
+ end
+
+ end
+
+ class Client::V20120125 < Client
+
# client methods #
# @!method count_closed_workflow_executions(options = {})
# Calls the CountClosedWorkflowExecutions API operation.
# @param [Hash] options
@@ -1283,27 +1307,9 @@
# @return [Core::Response]
# end client methods #
define_client_methods('2012-01-25')
-
- protected
-
- def cacheable_request? name, options
- if name == :poll_for_decision_task
- options.keys.include?(:next_page_token)
- else
- self.class::CACHEABLE_REQUESTS.include?(name)
- end
- end
-
- def build_request *args
- request = super(*args)
- if request.headers['x-amz-target'] =~ /PollFor(Decision|Activity)Task/
- request.read_timeout = 90
- end
- request
- end
end
end
end