Skip to content

Commit

Permalink
Flush after each print
Browse files Browse the repository at this point in the history
Otherwise, `ts` buffers output.
  • Loading branch information
booxter committed Dec 6, 2024
1 parent f5669f6 commit f6c481d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/letsrolld/cmd/fetch_directors.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ def get_directors_by_films(film_list):
) as e: # TODO: deduplicate error handling with update script
traceback.print_exception(e)
print(f"Retrying in {_SEC_WAIT_ON_FAIL} seconds...")
sys.stdout.flush()
time.sleep(_SEC_WAIT_ON_FAIL)
continue
print(f"Processed {i + 1}/{len(film_list)} films")
sys.stdout.flush()


def main():
Expand Down

0 comments on commit f6c481d

Please sign in to comment.