This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from typing import Coroutine, List, Sequence | |
def _limit_concurrency( | |
coroutines: Sequence[Coroutine], concurrency: int | |
) -> List[Coroutine]: | |
"""Decorate coroutines to limit concurrency. | |
Enforces a limit on the number of coroutines that can run concurrently in higher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import logging | |
LOGLEVEL = os.environ.get('LOGLEVEL', 'INFO').upper() | |
logging.basicConfig(level=LOGLEVEL, format="%(asctime)s %(message)s") |