Skip to content

Commit a2fe946

Browse files
dubeeJason Peterson
authored andcommitted
Do not update last canary everytime a database connection attempt occurs (#356)
1 parent 76ed470 commit a2fe946

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

provider/service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __init__(self, consumers):
5050

5151
def run(self):
5252
self.canaryGenerator.start()
53+
self.lastCanaryTime = datetime.now()
5354

5455
while True:
5556
try:
@@ -61,8 +62,6 @@ def run(self):
6162
self.database = Database(timeout=changesFeedTimeout)
6263
self.changes = self.database.changesFeed(timeout=changesFeedTimeout, since=self.lastSequence)
6364

64-
self.lastCanaryTime = datetime.now()
65-
6665
for change in self.changes:
6766
# change could be None because the changes feed will timeout
6867
# if it hasn't detected any changes. This timeout allows us to

0 commit comments

Comments
 (0)