@@ -95,7 +95,7 @@ var RetentionStatements = []retentionStatement{{
9595}}
9696
9797// RetentionOptions defines the non-default mapping of history categories with their retention period in days.
98- type RetentionOptions map [string ]uint64
98+ type RetentionOptions map [string ]uint16
9999
100100// Validate checks constraints in the supplied retention options and
101101// returns an error if they are violated.
@@ -120,16 +120,16 @@ func (o RetentionOptions) Validate() error {
120120type Retention struct {
121121 db * database.DB
122122 logger * logging.Logger
123- historyDays uint64
124- slaDays uint64
123+ historyDays uint16
124+ slaDays uint16
125125 interval time.Duration
126126 count uint64
127127 options RetentionOptions
128128}
129129
130130// NewRetention returns a new Retention.
131131func NewRetention (
132- db * database.DB , historyDays uint64 , slaDays uint64 , interval time.Duration ,
132+ db * database.DB , historyDays , slaDays uint16 , interval time.Duration ,
133133 count uint64 , options RetentionOptions , logger * logging.Logger ,
134134) * Retention {
135135 return & Retention {
@@ -156,7 +156,7 @@ func (r *Retention) Start(ctx context.Context) error {
156156 errs := make (chan error , 1 )
157157
158158 for _ , stmt := range RetentionStatements {
159- var days uint64
159+ var days uint16
160160 switch stmt .RetentionType {
161161 case RetentionHistory :
162162 if d , ok := r .options [stmt .Category ]; ok {
@@ -177,7 +177,7 @@ func (r *Retention) Start(ctx context.Context) error {
177177 fmt .Sprintf ("Starting history retention for category %s" , stmt .Category ),
178178 zap .Uint64 ("count" , r .count ),
179179 zap .Duration ("interval" , r .interval ),
180- zap .Uint64 ("retention-days" , days ),
180+ zap .Uint16 ("retention-days" , days ),
181181 )
182182
183183 stmt := stmt
0 commit comments