Skip to content

Commit

Permalink
chore(deps): 升级依赖,docker构建版本
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdaYH committed Feb 4, 2024
1 parent 73719fd commit 4d20ae4
Show file tree
Hide file tree
Showing 4 changed files with 1,115 additions and 996 deletions.
8 changes: 4 additions & 4 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM python:3.11-slim-bullseye AS builder
FROM python:3.12-slim-bullseye AS builder

# install PDM
RUN pip install -U pip setuptools wheel
Expand All @@ -13,16 +13,16 @@ WORKDIR /tmp
RUN mkdir __pypackages__ && pdm sync --prod -G plugins --no-editable

# run stage
FROM python:3.11-slim-bullseye
FROM python:3.12-slim-bullseye

# retrieve packages from build stage
ENV PYTHONPATH=/pkgs
# copy files
WORKDIR /migangbot
COPY . /migangbot
COPY docker/build/db_config.yaml docker/build/.env /migangbot/
COPY --from=builder /tmp/__pypackages__/3.11/lib /pkgs
COPY --from=builder /tmp/__pypackages__/3.11/bin/* /bin/
COPY --from=builder /tmp/__pypackages__/3.12/lib /pkgs
COPY --from=builder /tmp/__pypackages__/3.12/bin/* /bin/

# install deps
RUN apt-get update \
Expand Down
4 changes: 2 additions & 2 deletions migang/plugins/daily_hotwords/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from sqlalchemy import JSON, Select, cast, select
from nonebot_plugin_datastore.db import get_engine
from nonebot_plugin_datastore import create_session
from nonebot_plugin_cesaa import get_messages_plain_text_by_target
from nonebot_plugin_cesaa import get_messages_plain_text
from nonebot_plugin_wordcloud.utils import (
get_datetime_now_with_timezone,
get_time_with_scheduler_timezone,
Expand Down Expand Up @@ -94,7 +94,7 @@ async def run_task(self, time: Optional[time] = None):
dt = get_datetime_now_with_timezone()
start = dt.replace(hour=0, minute=0, second=0, microsecond=0)
stop = dt
messages = await get_messages_plain_text_by_target(
messages = await get_messages_plain_text(
target=target,
types=["message"],
time_start=start,
Expand Down
Loading

0 comments on commit 4d20ae4

Please sign in to comment.