Skip to content

Allow specifying timeout #20

@soundrussian

Description

@soundrussian

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions