How to use the aiojobs._scheduler.Scheduler function in aiojobs

To help you get started, we’ve selected a few aiojobs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aio-libs / aiojobs / aiojobs / __init__.py View on Github external
async def create_scheduler(*, close_timeout=0.1, limit=100,
                           pending_limit=10000, exception_handler=None):
    if exception_handler is not None and not callable(exception_handler):
        raise TypeError('A callable object or None is expected, '
                        'got {!r}'.format(exception_handler))
    loop = asyncio.get_event_loop()
    return Scheduler(loop=loop, close_timeout=close_timeout,
                     limit=limit, pending_limit=pending_limit,
                     exception_handler=exception_handler)