예제 #1
0
def ensure_async(func: Callable) -> Callable:
    if inspect.iscoroutinefunction(func):
        return func
    else:
        return sync_to_async(func)
예제 #2
0
def ensure_async(func: Callable) -> Callable:
    return sync_to_async(func)