From bca5addab3625fdbb278ede47618a19947d4b34e Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 25 Jun 2019 15:00:38 -0700 Subject: [PATCH] For failed steps, yield fake 0 instead of artificial wait. Because the caller can impose their own wait between steps of the generator. --- timesearch/livestream.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/timesearch/livestream.py b/timesearch/livestream.py index c7e0137..992a2a0 100644 --- a/timesearch/livestream.py +++ b/timesearch/livestream.py @@ -154,8 +154,9 @@ def _livestream_as_a_generator( yield newitems except Exception: traceback.print_exc() - print('Retrying in 5...') - time.sleep(5) + print('Retrying...') + step = {'tsdb': database, 'new_comments': 0, 'new_submissions': 0} + yield step def _livestream_helper( submission_function=None,