For failed steps, yield fake 0 instead of artificial wait.
Because the caller can impose their own wait between steps of the generator.
This commit is contained in:
parent
feed4c5621
commit
bca5addab3
1 changed files with 3 additions and 2 deletions
|
@ -154,8 +154,9 @@ def _livestream_as_a_generator(
|
||||||
yield newitems
|
yield newitems
|
||||||
except Exception:
|
except Exception:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print('Retrying in 5...')
|
print('Retrying...')
|
||||||
time.sleep(5)
|
step = {'tsdb': database, 'new_comments': 0, 'new_submissions': 0}
|
||||||
|
yield step
|
||||||
|
|
||||||
def _livestream_helper(
|
def _livestream_helper(
|
||||||
submission_function=None,
|
submission_function=None,
|
||||||
|
|
Loading…
Reference in a new issue