Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-111

Add timeouts handling

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: None

      Description

      We should set defaults timeouts for  "connect" and "read" requests.

      This can be done via the timeout keyword argument passed to requests:

      timeout: How long to wait for the server to send
      data before giving up, as a float, or a (connect timeout,
      read timeout) tuple.

      For example:

      timeout(5, 14)

      Here, the "connect" timeout is 5 seconds and "read" timeout is 14 seconds. This will allow the request to fail much more quicklly if it can't connect to the resource, and if it does connect then it will give it more time to download the data.

      Let's pick 5 for the "connect" timeout (stored as TIMEOUT_CONNECT) and 30 for the "read" (stored as TIMEOUT_READ).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m