andrewgross / pyrelic

New Relic Python API
MIT License
21 stars 11 forks source link

Client.get_metric_names overrides timeout #11

Closed mpilar closed 11 years ago

mpilar commented 11 years ago

The hardcoded 5.0 timeout on get_metric_names overrides whatever timeout you may have set on a Client's constructor, therefore causes requests to time out when requesting a lot of metrics.

The lines (203-205 of client.py) could be:

        response = self._make_get_request(uri,
                                          parameters=parameters,
                                          timeout=(5.000 if self.timeout < 5.0
                                                         else self.timeout))
mpilar commented 11 years ago

Created a pull request for this.