Skip to content

Add config parameter for request timeout #63

@bartek

Description

@bartek

We use requests internally to make calls out to the G API. By default, requests has no timeout defined, and it's up to the backend source to define when it'll give up. Currently we have a backend time out of 60 seconds, primarily due to resources like the bundler.

Requests greatly encourages we set a reasonable timeout and use it in every production call [1]

You can tell Requests to stop waiting for a response after a given number of seconds with the timeout parameter. Nearly all production code should use this parameter in nearly all requests. Failure to do so can cause your program to hang indefinitely:

This should be added as a configurable parameter, with a reasonable default (20 or 30 seconds seems more than enough)

  1. http://docs.python-requests.org/en/master/user/quickstart/#timeouts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions