lib/fbe/octo.rb in fbe-0.0.23 vs lib/fbe/octo.rb in fbe-0.0.24
- old
+ new
@@ -55,12 +55,17 @@
open_timeout: 15,
timeout: 15
}
}
stack = Faraday::RackBuilder.new do |builder|
- builder.use(Faraday::Retry::Middleware)
- builder.use(Faraday::HttpCache, serializer: Marshal, shared_cache: false)
+ builder.use(
+ Faraday::Retry::Middleware,
+ exceptions: Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS + [Octokit::TooManyRequests],
+ max: 5, interval: 1
+ )
+ builder.use(Faraday::HttpCache, serializer: Marshal, shared_cache: false, logger: Loog::NULL)
builder.use(Octokit::Response::RaiseError)
+ builder.use(Faraday::Response::Logger, Loog::NULL)
builder.adapter(Faraday.default_adapter)
end
o.middleware = stack
o = Verbose.new(o, log: loog)
else