Skip to content

Commit

Permalink
pinning retriable gem to ProsperWorks fork at ProsperWorks/retriable
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymmg committed Feb 19, 2019
1 parent 190a9f6 commit 532a6bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ gemspec

gem 'jruby-openssl', :platforms => :jruby

gem 'legacy-retriable',
git: 'https://github.com/ProsperWorks/retriable',
ref: '9937072f73b7d9804a758fd99900bd683a6b2e72'

if ENV['RAILS_VERSION']
gem 'rails', ENV['RAILS_VERSION']
end
end
2 changes: 1 addition & 1 deletion google-api-client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'autoparse', '~> 0.3'
s.add_runtime_dependency 'extlib', '~> 0.9'
s.add_runtime_dependency 'launchy', '~> 2.4'
s.add_runtime_dependency 'retriable', '~> 1.4'
s.add_runtime_dependency 'legacy-retriable', '1.4.2'
s.add_runtime_dependency 'activesupport', '>= 3.2', '< 5.0'

s.add_development_dependency 'rake', '~> 10.0'
Expand Down
6 changes: 3 additions & 3 deletions lib/legacy/google/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require 'multi_json'
require 'compat/multi_json'
require 'stringio'
require 'retriable'
require 'legacy/retriable'

require 'legacy/google/api_client/version'
require 'legacy/google/api_client/logging'
Expand Down Expand Up @@ -635,7 +635,7 @@ def execute!(*params)
tries = 1 + (options[:retries] || self.retries)
attempt = 0

Retriable.retriable :tries => tries,
Legacy::Retriable.legacy_retriable :tries => tries,
:on => [TransmissionError],
:on_retry => client_error_handler,
:interval => lambda {|attempts| (2 ** attempts) + rand} do
Expand All @@ -644,7 +644,7 @@ def execute!(*params)
# This 2nd level retriable only catches auth errors, and supports 1 retry, which allows
# auth to be re-attempted without having to retry all sorts of other failures like
# NotFound, etc
Retriable.retriable :tries => ((expired_auth_retry || tries > 1) && attempt == 1) ? 2 : 1,
Legacy::Retriable.legacy_retriable :tries => ((expired_auth_retry || tries > 1) && attempt == 1) ? 2 : 1,
:on => [AuthorizationError],
:on_retry => authorization_error_handler(request.authorization) do
result = request.send(connection, true)
Expand Down

0 comments on commit 532a6bd

Please sign in to comment.