1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-16 23:29:25 +00:00

Add metrics (#747)

* Add metrics

* Add obj_cache in session

---------

Co-authored-by: Heran Yang <heran.yang@seafile.com>
This commit is contained in:
feiniks
2025-03-31 16:46:24 +08:00
committed by GitHub
parent c963a54a82
commit 490f8d431c
22 changed files with 1293 additions and 69 deletions

View File

@@ -9,7 +9,7 @@ import (
"errors"
"fmt"
"html"
"io/ioutil"
"io"
"net"
"net/http"
"strconv"
@@ -469,7 +469,7 @@ func recvFSCB(rsp http.ResponseWriter, r *http.Request) *appError {
err := fmt.Errorf("Failed to get repo store id by repo id %s: %v", repoID, err)
return &appError{err, "", http.StatusInternalServerError}
}
fsBuf, err := ioutil.ReadAll(r.Body)
fsBuf, err := io.ReadAll(r.Body)
if err != nil {
return &appError{nil, err.Error(), http.StatusBadRequest}
}
@@ -950,7 +950,7 @@ func putCommitCB(rsp http.ResponseWriter, r *http.Request) *appError {
return appErr
}
data, err := ioutil.ReadAll(r.Body)
data, err := io.ReadAll(r.Body)
if err != nil {
return &appError{nil, err.Error(), http.StatusBadRequest}
}