Skip to content

Commit

Permalink
Check for custom timer every 60s
Browse files Browse the repository at this point in the history
  • Loading branch information
sumukhatv committed Sep 16, 2022
1 parent fe97879 commit af2dd6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sonic-bgpcfgd/bgpcfgd/static_rt_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def __init__(self):
self.start = None

DEFAULT_TIMER = 180
DEFAULT_SLEEP = 60
MAX_TIMER = 1800

def set_timer(self):
Expand Down Expand Up @@ -49,6 +50,6 @@ def run(self):
time.sleep(self.timer)
self.alarm()
else:
time.sleep(1)
time.sleep(self.DEFAULT_SLEEP)
if time.time() - self.start >= self.DEFAULT_TIMER:
self.alarm()

0 comments on commit af2dd6d

Please sign in to comment.