Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3288

[csot] Add pymongo.timeout() context manager API

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Unknown
    • Resolution: Fixed
    • None
    • 4.2
    • None
    • None

    Description

      For CSOT, add pymongo.timeout() context manager API:

      import pymongo
      # All blocking pymongo operations in this context combined
      # must complete within 100ms or raise a timeout exception.
      with pymongo.timeout(0.1):
          d1 = client1.db1.c1.find_one()
          d2 = client2.db2.c2.find_one()
      

      Attachments

        Issue Links

          Activity

            People

              shane.harvey@mongodb.com Shane Harvey
              shane.harvey@mongodb.com Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: