Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit 8990830

Browse files
committed
fix parsing receiver statistics replies
1 parent 517bc31 commit 8990830

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/gateway/receiver/receiver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ func (r *CvmfsReceiver) reply() ([]byte, error) {
323323
func parseReceiverReply(reply []byte) (*ReceiverReply, error) {
324324
res := &ReceiverReply{}
325325
if err := json.Unmarshal(reply, res); err != nil {
326-
return nil, errors.Wrap(err, "could not decode reply")
326+
return nil, errors.Wrap(err, "could not decode receiver reply '" + string(reply[:]) + "'")
327327
}
328328
if res.Status != "ok" {
329329
return res, Error(res.Reason)

internal/gateway/statistics/statistics.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import (
1010
)
1111

1212
type PublishCounters struct {
13-
ChunksAdded int64 `json:"n_chunks_added,string"`
14-
ChunksDuplicated int64 `json:"n_chunks_duplicated,string"`
15-
CatalogsAdded int64 `json:"n_catalogs_added,string"`
16-
UploadedBytes int64 `json:"sz_uploaded_bytes,string"`
17-
UploadedCatalogBytes int64 `json:"sz_uploaded_catalog_bytes,string"`
13+
ChunksAdded int64 `json:"n_chunks_added"`
14+
ChunksDuplicated int64 `json:"n_chunks_duplicated"`
15+
CatalogsAdded int64 `json:"n_catalogs_added"`
16+
UploadedBytes int64 `json:"sz_uploaded_bytes"`
17+
UploadedCatalogBytes int64 `json:"sz_uploaded_catalog_bytes"`
1818
}
1919

2020
type Statistics struct {

0 commit comments

Comments
 (0)