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

possible timeout option #39

Open
marcelfischer opened this issue Nov 12, 2021 · 0 comments
Open

possible timeout option #39

marcelfischer opened this issue Nov 12, 2021 · 0 comments

Comments

@marcelfischer
Copy link

marcelfischer commented Nov 12, 2021

Hello, would it be possible to implement a timeout option? Sometimes we have puppet queries which end in:

/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/protocol.rb:181:in `rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)

I could fix that by adding a timeout parameter to ./lib/puppetdb/client.rb:

93c93
<       ret = self.class.get(path, body: filtered_opts)
---
>       ret = self.class.get(path, body: filtered_opts, timeout: 300)
115a116
>         timeout: 300,

But I guess a better approach would be to add this as a parameter like this:

client = PuppetDB::Client.new({
    :server => 'https://localhost:8081',
    :timeout => 300,
    :pem    => {
        'key'     => "keyfile",
        'cert'    => "certfile",
        'ca_file' => "cafile"
    }})
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