change static rt expiry timer max value (#14397) (#14419)

This commit is contained in:
mssonicbld 2023-03-26 23:31:29 +08:00 committed by GitHub
parent 4c4e9eec55
commit cc631fdf35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,8 @@ class StaticRouteTimer(object):
DEFAULT_TIMER = 180
DEFAULT_SLEEP = 60
MAX_TIMER = 1800
# keep same range as value defined in sonic-restapi/sonic_api.yaml
MAX_TIMER = 172800
def set_timer(self):
""" Check for custom route expiry time in STATIC_ROUTE_EXPIRY_TIME """
@ -55,4 +56,5 @@ class StaticRouteTimer(object):
else:
time.sleep(self.DEFAULT_SLEEP)
if time.time() - self.start >= self.DEFAULT_TIMER:
self.alarm()
self.alarm()