Skip to content

Commit

Permalink
Update Datastore retries documentation
Browse files Browse the repository at this point in the history
GAX does not directly support  integer.

[refs googleapis#848]
  • Loading branch information
quartzmo committed Oct 7, 2016
1 parent 6aa2102 commit ed0c9c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
8 changes: 3 additions & 5 deletions google-cloud-datastore/lib/google-cloud-datastore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ module Cloud
# The default scope is:
#
# * `https://www.googleapis.com/auth/datastore`
# @param [Integer] retries Number of times to retry requests on server
# error. The default value is `3`. Optional.
# @param [Integer] retries This option is not currently supported.
# @param [Integer] timeout Default timeout to use in requests. Optional.
#
# @return [Google::Cloud::Datastore::Dataset]
Expand Down Expand Up @@ -68,7 +67,7 @@ module Cloud
#
def datastore scope: nil, retries: nil, timeout: nil
Google::Cloud.datastore @project, @keyfile,
scope: scope, retries: (retries || @retries),
scope: scope, retries: retries,
timeout: (timeout || @timeout)
end

Expand All @@ -91,8 +90,7 @@ def datastore scope: nil, retries: nil, timeout: nil
# The default scope is:
#
# * `https://www.googleapis.com/auth/datastore`
# @param [Integer] retries Number of times to retry requests on server
# error. The default value is `3`. Optional.
# @param [Integer] retries This option is not currently supported.
# @param [Integer] timeout Default timeout to use in requests. Optional.
#
# @return [Google::Cloud::Datastore::Dataset]
Expand Down
19 changes: 3 additions & 16 deletions google-cloud-datastore/lib/google/cloud/datastore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -444,29 +444,16 @@ module Cloud
# end
# ```
#
# ## Configuring retries and timeout
# ## Configuring timeout
#
# You can configure how many times API requests may be automatically
# retried. When an API request fails, the response will be inspected to see
# if the request meets criteria indicating that it may succeed on retry,
# such as `500` and `503` status codes or a specific internal error code
# such as `rateLimitExceeded`. If it meets the criteria, the request will be
# retried after a delay. If another error occurs, the delay will be
# increased before a subsequent attempt, until the `retries` limit is
# reached.
#
# You can also set the request `timeout` value in seconds.
# You can configure the request `timeout` value in seconds.
#
# ```ruby
# require "google/cloud/datastore"
#
# datastore = Google::Cloud::Datastore.new retries: 10, timeout: 120
# datastore = Google::Cloud::Datastore.new timeout: 120
# ```
#
# See the [Datastore error
# codes](https://cloud.google.com/datastore/docs/concepts/errors#error_codes)
# for a list of error conditions.
#
# ## The Cloud Datastore Emulator
#
# As of this release, the Cloud Datastore emulator that is part of the
Expand Down

0 comments on commit ed0c9c1

Please sign in to comment.