feat: 账号池功能 & feat: 优化黑名单检查性能 & feat: scheduler支持传参

This commit is contained in:
helloplhm-qwq
2024-01-05 17:18:33 +08:00
parent ef4b4bfa24
commit c08b45586c
11 changed files with 242 additions and 60 deletions

View File

@ -20,7 +20,7 @@ logger = log('lx_script')
async def get_response(retry = 0):
if (retry > 10):
raise Exception('请求源脚本内容失败')
logger.warning('请求源脚本内容失败')
baseurl = 'https://raw.githubusercontent.com/lxmusics/lx-music-api-server/main/lx-music-source-example.js'
try:
if (iscn and (retry % 2) == 0):
@ -39,7 +39,7 @@ async def get_script():
f.close()
logger.info('更新源脚本成功')
else:
raise Exception('请求源脚本内容失败')
logger.warning('请求源脚本内容失败')
async def generate_script_response(request):
if (request.query.get('key') != config.read_config('security.key.value') and config.read_config('security.key.enable')):