fix: 移除无用文件,忽略文件名中的非法字符

This commit is contained in:
amtoaer
2023-11-23 00:50:46 +08:00
parent 83b1812e7f
commit 5b98fc28db
4 changed files with 21 additions and 13 deletions

View File

@@ -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())