Skip to content

Commit

Permalink
feat(scraper): sleep for more predictable time and be verbose.
Browse files Browse the repository at this point in the history
  • Loading branch information
2e0byo committed Jan 27, 2022
1 parent ed6a0de commit dbe4efb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion yadc/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,13 @@ def __call__(self):
while self.running:
for driver in self.drivers:
self.find_tests(browser, driver)
randsleep(self.time_to_next_event())
period = self.time_to_next_event()
self._logger.debug(f"Sleeping for {period}")
spinner_sleep(period)
self._logger.debug(
f"Sleeping for ~10s to introduce some randomness."
)
randsleep(10)
except Exception as e:
errs.append(monotonic())
self._logger.exception(e)
Expand Down

0 comments on commit dbe4efb

Please sign in to comment.