Ejemplo n.º 1
0
def ensure_async(func: Callable) -> Callable:
    if inspect.iscoroutinefunction(func):
        return func
    else:
        return sync_to_async(func)
Ejemplo n.º 2
0
def ensure_async(func: Callable) -> Callable:
    return sync_to_async(func)