ocket8888 commented on a change in pull request #4718:
URL: https://github.com/apache/trafficcontrol/pull/4718#discussion_r430675950
##########
File path: lib/go-tc/invalidationjobs.go
##########
@@ -349,12 +356,13 @@ func (job *UserInvalidationJobInput) Validate(tx *sql.Tx)
error {
if job.TTL != nil {
row := tx.QueryRow(`SELECT value FROM parameter WHERE
name='maxRevalDurationDays' AND config_file='regex_revalidate.config'`)
- var max uint64
- err := row.Scan(&max)
+ var maxDays uint64
+ err := row.Scan(&maxDays)
+ maxHours := maxDays * 24
if err == sql.ErrNoRows && MaxTTL < *(job.TTL) {
errs = append(errs, "ttl: cannot exceed
"+strconv.FormatUint(MaxTTL, 10)+"!")
- } else if err == nil && max < *(job.TTL) { //silently ignore
other errors to
- errs = append(errs, "ttl: cannot exceed
"+strconv.FormatUint(max, 10)+"!")
+ } else if err == nil && maxHours < *(job.TTL) { //silently
ignore other errors to
Review comment:
or an "h"? I don't remember
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]