diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 095c039..d8a0e5d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -24,7 +24,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - run: python -m compileall src alembic + - run: python3 -m compileall src alembic diff --git a/cmd/server/main.go b/cmd/server/main.go index 10e63cc..aae46bf 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1028,7 +1028,11 @@ func (a *app) serveMinioMedia(w http.ResponseWriter, r *http.Request, key string slog.Warn("minio_get_media_failed", "key", key, "error", err) return false } - defer obj.Close() + defer func() { + if err := obj.Close(); err != nil { + slog.Warn("minio_media_close_failed", "key", key, "error", err) + } + }() info, err := obj.Stat() if err != nil { return false