organize folder structure

This commit is contained in:
Gokul Mohanarangan
2023-07-10 14:16:00 +05:30
parent e01e42f2cb
commit 27f0602cf3
7 changed files with 8 additions and 8 deletions

7
utils/server_utils.py Normal file
View File

@@ -0,0 +1,7 @@
import asyncio
from functools import partial
def run_in_executor(func, *args, executor=None, **kwargs):
callback = partial(func, *args, **kwargs)
loop = asyncio.get_event_loop()
return asyncio.get_event_loop().run_in_executor(executor, callback)