pulp / pulp-openapi-generator

GNU General Public License v2.0
4 stars 24 forks source link

faraday timeout is not configured properly on ruby client #61

Closed matt8754 closed 2 years ago

matt8754 commented 2 years ago

If I understand correctly, the timeout is configured on a single GET/POST/PUT, etc. request:

https://github.com/pulp/pulp-openapi-generator/blob/main/templates/ruby/api_client_faraday_partial.mustache#L82

This does not seem right to me as it should be configured on initialization:

https://github.com/pulp/pulp-openapi-generator/blob/main/templates/ruby/api_client_faraday_partial.mustache#L16

or after

https://github.com/pulp/pulp-openapi-generator/blob/main/templates/ruby/api_client_faraday_partial.mustache#L93

request.options.timeout = @config.timeout

matt8754 commented 2 years ago

Also, is this true?

# The time limit for HTTP request in seconds.
# Default to 0 (never times out).
attr_accessor :timeout