Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Sleep (0.14 sec)

  1. .github/actions/notify-translations/app/main.py

        # Avoid race conditions with multiple labels
        sleep_time = random.random() * 10  # random number between 0 and 10 seconds
        logging.info(
            f"Sleeping for {sleep_time} seconds to avoid "
            "race conditions and multiple comments"
        )
        time.sleep(sleep_time)
    
        # Get PR
        logging.debug(f"Processing PR: #{github_event.pull_request.number}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  2. docs/em/docs/how-to/sql-databases-peewee.md

    ```Python hl_lines="2"
    # Something goes here
    def read_users(skip: int = 0, limit: int = 100):
        # Something goes here
    ```
    
    ## ๐Ÿ”ฌ ๐Ÿ’ โฎ๏ธ ๐Ÿ”
    
    ๐Ÿ‘‰ ๐Ÿ–ผ ๐Ÿ”Œ โž• *โžก ๐Ÿ› ๏ธ* ๐Ÿ‘ˆ ๐Ÿ”ฌ ๐Ÿ“ ๐Ÿญ ๐Ÿ“จ โฎ๏ธ `time.sleep(sleep_time)`.
    
    โšซ๏ธ ๐Ÿ”œ โœ”๏ธ ๐Ÿ’ฝ ๐Ÿ”— ๐Ÿ“‚ โ–ถ๏ธ & ๐Ÿ”œ โŒ› ๐Ÿฅˆ โญ ๐Ÿ™‡ ๐Ÿ”™. & ๐Ÿ”  ๐Ÿ†• ๐Ÿ“จ ๐Ÿ”œ โŒ› ๐Ÿ• ๐Ÿฅˆ ๐ŸŒ˜.
    
    ๐Ÿ‘‰ ๐Ÿ”œ ๐Ÿ’ช โžก๏ธ ๐Ÿ‘† ๐Ÿ’ฏ ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿ“ฑ โฎ๏ธ ๐Ÿ’ & FastAPI ๐ŸŽญ โ˜‘ โฎ๏ธ ๐ŸŒ ๐Ÿ’ฉ ๐Ÿ”ƒ ๐Ÿงต.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  3. docs_src/sql_databases_peewee/sql_app/main.py

        return items
    
    
    @app.get(
        "/slowusers/", response_model=List[schemas.User], dependencies=[Depends(get_db)]
    )
    def read_slow_users(skip: int = 0, limit: int = 100):
        global sleep_time
        sleep_time = max(0, sleep_time - 1)
        time.sleep(sleep_time)  # Fake long processing request
        users = crud.get_users(skip=skip, limit=limit)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 2.2K bytes
    - Viewed (0)
  4. docs/en/docs/how-to/sql-databases-peewee.md

    def read_users(skip: int = 0, limit: int = 100):
        # Something goes here
    ```
    
    ## Testing Peewee with async
    
    This example includes an extra *path operation* that simulates a long processing request with `time.sleep(sleep_time)`.
    
    It will have the database connection open at the beginning and will just wait some seconds before replying back. And each new request will wait one second less.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
Back to top