Add size of the snapshot into the structure
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
81bcdcf00c
commit
7616eef12b
@ -109,6 +109,12 @@ func (s *SnapshotProcessor) CreateSnapshot(appName string, labels []string) (str
|
|||||||
return snapshot.KeyName(), fmt.Errorf("compression error: %v", err)
|
return snapshot.KeyName(), fmt.Errorf("compression error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info, err := os.Stat(tmpSnapshotArchivePath)
|
||||||
|
if err != nil {
|
||||||
|
return snapshot.KeyName(), fmt.Errorf("temporary file stat error: %v", err)
|
||||||
|
}
|
||||||
|
snapshot.Labels = append(snapshot.Labels, fmt.Sprintf("size:%d", info.Size()))
|
||||||
|
|
||||||
// Clean after myself
|
// Clean after myself
|
||||||
defer func() {
|
defer func() {
|
||||||
err = os.Remove(tmpSnapshotArchivePath)
|
err = os.Remove(tmpSnapshotArchivePath)
|
||||||
|
Loading…
Reference in New Issue
Block a user