Skip to content

Commit

Permalink
chore(pgs): print 4 decimal places special files
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Oct 18, 2024
1 parent ec83e1d commit 6e6fc5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions filehandlers/assets/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ func (h *UploadAssetHandler) Write(s ssh.Session, entry *sendutils.FileEntry) (s
return "", fmt.Errorf("storage quota reached")
}
logger = logger.With(
"storage max", storageMax,
"current storage max", curStorageSize,
"file max", fileMax,
"storageMax", storageMax,
"currentStorageMax", curStorageSize,
"fileMax", fileMax,
"sizeRemaining", sizeRemaining,
)

Expand All @@ -375,7 +375,7 @@ func (h *UploadAssetHandler) Write(s ssh.Session, entry *sendutils.FileEntry) (s
if err != nil {
logger.Error("could not write asset", "err", err.Error())
cerr := fmt.Errorf(
"%s: storage size %.2fmb, storage max %.2fmb, file max %.2fmb, special file max %.2fmb",
"%s: storage size %.2fmb, storage max %.2fmb, file max %.2fmb, special file max %.4fmb",
err,
utils.BytesToMB(int(curStorageSize)),
utils.BytesToMB(int(storageMax)),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/picosh/pubsub v0.0.0-20241008010300-a63fd95dc8ed
github.com/picosh/send v0.0.0-20241008013240-6fdbff00f848
github.com/picosh/tunkit v0.0.0-20240709033345-8315d4f3cd0e
github.com/picosh/utils v0.0.0-20241008004349-f48b50af554b
github.com/picosh/utils v0.0.0-20241018143404-b351d5d765f3
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sendgrid/sendgrid-go v3.14.0+incompatible
github.com/simplesurance/go-ip-anonymizer v0.0.0-20200429124537-35a880f8e87d
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0 h1:pBRIbiCj7K6rGELij
github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0/go.mod h1:QaBDtybFC5gz7EG/9c3bgzuyW7W5W2rYLFZxWNuWk3Q=
github.com/picosh/tunkit v0.0.0-20240709033345-8315d4f3cd0e h1:3rNSjBJ6VlvngWF58V/z0fPLH7WyzKpSboC6YznECgw=
github.com/picosh/tunkit v0.0.0-20240709033345-8315d4f3cd0e/go.mod h1:UrDH/VCIc1wg/L6iY2zSYt4TiGw+25GsKSnkVkU40Dw=
github.com/picosh/utils v0.0.0-20241008004349-f48b50af554b h1:PvWk8Y7JhC1bK4Ns7FUFfcvi+BGZ+K07wTA2VDTmfDQ=
github.com/picosh/utils v0.0.0-20241008004349-f48b50af554b/go.mod h1:ftrp1FjbKK/mFnBAYGymA1QEtPlkA0+lWkPI5h0HKt4=
github.com/picosh/utils v0.0.0-20241018143404-b351d5d765f3 h1:1t/w0GrzwA3rkdotEsHbZIlCOv0T28qtO0U60/iOgQQ=
github.com/picosh/utils v0.0.0-20241018143404-b351d5d765f3/go.mod h1:ftrp1FjbKK/mFnBAYGymA1QEtPlkA0+lWkPI5h0HKt4=
github.com/pkg/sftp v1.13.6 h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo=
github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down

0 comments on commit 6e6fc5e

Please sign in to comment.