⬆️ upgrade uvicorn

This commit is contained in:
yanyongyu
2021-09-28 20:56:05 +08:00
parent 2ebf7fc096
commit 0b08d23e34
4 changed files with 49 additions and 49 deletions

View File

@ -1,4 +1,4 @@
ENVIRONMENT=dev
LOG_LEVEL=25
CUSTOM_CONFIG=common
FASTAPI_RELOAD_DIRS=["test_plugins"]
# FASTAPI_RELOAD_DIRS=["test_plugins"]

View File

@ -5,10 +5,10 @@ sys.path.insert(0, os.path.abspath(".."))
import nonebot
from nonebot.adapters.cqhttp import Bot
from nonebot.log import logger, default_format
from nonebot.adapters.ding import Bot as DingBot
from nonebot.adapters.mirai import Bot as MiraiBot
from nonebot.adapters.feishu import Bot as FeishuBot
from nonebot.log import logger, default_format
# test custom log
logger.add("error.log",
@ -18,7 +18,7 @@ logger.add("error.log",
format=default_format)
nonebot.init(custom_config2="config on init")
# app = nonebot.get_asgi()
app = nonebot.get_asgi()
driver = nonebot.get_driver()
driver.register_adapter("cqhttp", Bot)
driver.register_adapter("ding", DingBot)
@ -37,5 +37,5 @@ config.custom_config3 = config.custom_config1
config.custom_config4 = "New custom config"
if __name__ == "__main__":
# nonebot.run(app="__mp_main__:app")
nonebot.run()
nonebot.run(app="__mp_main__:app")
# nonebot.run()