This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from inspect import isclass | |
from pkgutil import iter_modules | |
from pathlib import Path | |
from importlib import import_module | |
REF = {} | |
# iterate through the modules in the current package | |
package_dir = str(Path(__file__).resolve().parent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import time | |
import random | |
async def task(n: int): | |
await asyncio.sleep(random.randint(1, 3)) | |
print(f"task{n} finish") | |