Use database status and health, calculate md5
This commit is contained in:
parent
806f6e7e61
commit
78d818b8d1
7 changed files with 112 additions and 37 deletions
|
@ -52,7 +52,7 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
|
|||
}()
|
||||
|
||||
var size int
|
||||
err := db.QueryRow(r.Context(), "SELECT SUM(size) AS size FROM files WHERE missing = $1", false).Scan(&size)
|
||||
err := db.QueryRow(r.Context(), "SELECT SUM(size) AS size FROM files WHERE status = $1", constants.FILE_STATUS_EXISTS).Scan(&size)
|
||||
if err != nil {
|
||||
size = 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue