fix for retention logic
This commit is contained in:
parent
70c0ba44f0
commit
e6bfe2d444
35 changed files with 2108 additions and 132 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
// MediaKind identifies which table a media_references row points into.
|
||||
type MediaKind string
|
||||
|
||||
|
|
@ -45,6 +47,16 @@ type OrphanCandidate struct {
|
|||
OrphanedAt int64 // unix seconds
|
||||
}
|
||||
|
||||
// EvictionCandidate is one document/photo still owning file_blobs bytes,
|
||||
// used by the active-eviction sweep (TELESRV_STORAGE_EVICTION_ENABLE) to pick
|
||||
// the oldest media overall across both tables once total physical storage
|
||||
// exceeds TELESRV_STORAGE_MAX_TOTAL_BYTES.
|
||||
type EvictionCandidate struct {
|
||||
Kind MediaKind
|
||||
MediaID int64
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
// MediaRefTarget identifies one document/photo embedded in a message's media
|
||||
// snapshot.
|
||||
type MediaRefTarget struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue