mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-05-11 18:11:05 +08:00
fix: 移除无用文件,忽略文件名中的非法字符
This commit is contained in:
7
entry.py
7
entry.py
@@ -1,6 +1,8 @@
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from processor import process
|
||||
from settings import settings
|
||||
|
||||
@@ -8,11 +10,14 @@ from settings import settings
|
||||
async def entry() -> None:
|
||||
if any("once" in _ for _ in sys.argv):
|
||||
# 单次运行
|
||||
logger.info("Running once...")
|
||||
await process()
|
||||
return
|
||||
logger.info("Running daemon...")
|
||||
while True:
|
||||
await process()
|
||||
await asyncio.sleep(settings.interval * 60)
|
||||
|
||||
|
||||
def start() -> None:
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(entry())
|
||||
|
||||
Reference in New Issue
Block a user