Actually update trains continuously
Some checks failed
docker-image / docker (push) Has been cancelled
Some checks failed
docker-image / docker (push) Has been cancelled
This commit is contained in:
parent
2e4e0d072d
commit
4310ea5b60
1 changed files with 7 additions and 6 deletions
|
@ -36,12 +36,13 @@ class DBFAnimation(BubaAnimation):
|
||||||
self.log.info(f"Fetched {len(trains)} trains")
|
self.log.info(f"Fetched {len(trains)} trains")
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
try:
|
while True:
|
||||||
self.fetch()
|
try:
|
||||||
except Exception as e:
|
self.fetch()
|
||||||
self.log.warning(f"Unable to fetch {self.station}: {e}")
|
except Exception as e:
|
||||||
pass
|
self.log.warning(f"Unable to fetch {self.station}: {e}")
|
||||||
sleep(60)
|
pass
|
||||||
|
sleep(60)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def countdown(dt: datetime):
|
def countdown(dt: datetime):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue