From 4310ea5b6075d9f8a04489a8bf86037f8d14e7ab Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Fri, 13 Jun 2025 19:05:35 +0200 Subject: [PATCH] Actually update trains continuously --- buba/animations/dbf.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/buba/animations/dbf.py b/buba/animations/dbf.py index 2ad4a0a..a444dbf 100644 --- a/buba/animations/dbf.py +++ b/buba/animations/dbf.py @@ -36,12 +36,13 @@ class DBFAnimation(BubaAnimation): self.log.info(f"Fetched {len(trains)} trains") def update(self): - try: - self.fetch() - except Exception as e: - self.log.warning(f"Unable to fetch {self.station}: {e}") - pass - sleep(60) + while True: + try: + self.fetch() + except Exception as e: + self.log.warning(f"Unable to fetch {self.station}: {e}") + pass + sleep(60) @staticmethod def countdown(dt: datetime):