Skip to content

Commit

Permalink
chore: Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Dec 15, 2023
2 parents e33c210 + 3eec445 commit 7f852e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM python:3.10.13-slim-bullseye
FROM python:3.10-alpine

WORKDIR /app

COPY . /app
COPY ./main.py .
COPY ./common ./common
COPY ./modules ./modules
COPY ./requirements.txt .

# 指定源, 如果后期源挂了, 更换个源就可以.
RUN pip install --no-cache -i https://pypi.mirrors.ustc.edu.cn/simple/ -r requirements.txt

CMD [ "python", "main.py" ]
CMD [ "python", "main.py" ]
4 changes: 2 additions & 2 deletions modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def handleApiRequest(command, source, songId, quality):
}
try:
result = await func(songId, quality)
logger.debug(f'获取{source}_{songId}_{quality}成功,URL:{result['url']}')
logger.debug(f'获取{source}_{songId}_{quality}成功,URL:{result["url"]}')

canExpire = sourceExpirationTime[source]['expire']
expireTime = sourceExpirationTime[source]['time'] + int(time.time())
Expand All @@ -86,7 +86,7 @@ async def handleApiRequest(command, source, songId, quality):
"time": expireTime,
"url": result['url'],
})
logger.debug(f'缓存已更新:{source}_{songId}_{quality}, URL:{result['url']}, expire: {expireTime}')
logger.debug(f'缓存已更新:{source}_{songId}_{quality}, URL:{result["url"]}, expire: {expireTime}')

return {
'code': 0,
Expand Down

0 comments on commit 7f852e0

Please sign in to comment.