Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying timeout #20

Open
soundrussian opened this issue Aug 1, 2018 · 0 comments
Open

Allow specifying timeout #20

soundrussian opened this issue Aug 1, 2018 · 0 comments

Comments

@soundrussian
Copy link

It seems like there's no way to pass config to underlying Faraday adapters.

Right now we have to do this ugly hack:

 module Clickhouse
    class Connection
      module Client
        def client
          @client ||= Faraday.new(url: url) do |f|
            f.adapter :net_http do |http|
              http.read_timeout = 300
            end
          end
        end
      end
    end
  end

Is there anyway to pass this config to the client? Or perhaps we should make 300 seconds the default timeout, since that's the default in Clickhouse server as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant