This repository has been archived on 2024-02-23. You can view files and clone it, but cannot push or open issues or pull requests.
Auberge_Vagabonde/executor.py
Michel Roux bd60f3c0c5
Some checks failed
continuous-integration/drone/push Build is failing
Fix async + drone
2022-01-18 21:53:50 +00:00

13 lines
255 B
Python

import asyncio
import functools
def executor(f):
@functools.wraps(f)
async def wrapped(*args, **kwargs):
return await asyncio.get_running_loop().run_in_executor(
None, lambda: f(*args, **kwargs)
)
return wrapped