srijeet0406 commented on code in PR #6757:
URL: https://github.com/apache/trafficcontrol/pull/6757#discussion_r855641313
##########
traffic_ops/traffic_ops_golang/trafficvault/backends/postgres/postgres.go:
##########
@@ -199,12 +215,10 @@ func (p *Postgres) GetExpirationInformation(tx *sql.Tx,
ctx context.Context, day
if err = rows.Scan(&expirationInfo.DeliveryService,
&expirationInfo.CDN, &expirationInfo.Provider, &expirationInfo.Expiration); err
!= nil {
return []tc.SSLKeyExpirationInformation{}, err
}
- expirationInfo.Federated = false
- for _, fed := range fedList {
- if fed == expirationInfo.DeliveryService {
- expirationInfo.Federated = true
- }
+ if inactiveList[expirationInfo.DeliveryService] {
+ continue
}
+ expirationInfo.Federated = util.ContainsStr(fedList,
expirationInfo.DeliveryService)
Review Comment:
I should have explained better in my previous comment, my bad. But, do you
think converting the `fedList` into a map also makes sense, because of the same
reason? That way we won't have to traverse the `fedList` array to look for the
`expirationInfo.DeliveryService` key.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]