mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-06-01 21:59:49 +08:00
feat: 使用 uvloop 替代 asyncio,引入 model
This commit is contained in:
5
entry.py
5
entry.py
@@ -1,13 +1,18 @@
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
import uvloop
|
||||
from loguru import logger
|
||||
|
||||
from models import init_model
|
||||
from processor import process
|
||||
from settings import settings
|
||||
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
|
||||
|
||||
async def entry() -> None:
|
||||
await init_model()
|
||||
if any("once" in _ for _ in sys.argv):
|
||||
# 单次运行
|
||||
logger.info("Running once...")
|
||||
|
||||
Reference in New Issue
Block a user