From a751903eee26570360266ac775067d92f2b9185d Mon Sep 17 00:00:00 2001 From: Konrad Date: Fri, 27 Sep 2019 21:02:10 +0200 Subject: [PATCH] caching only if some meals were found last time Signed-off-by: Konrad --- HSMensaW_botA.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HSMensaW_botA.py b/HSMensaW_botA.py index 7b271c7..6471be1 100644 --- a/HSMensaW_botA.py +++ b/HSMensaW_botA.py @@ -249,7 +249,7 @@ async def get_essen(only_today: bool) -> None: :return: """ global datum, essen, essen_eng, var, last_updated # , ctx - if time() < last_updated + 900: + if time() < last_updated + 30 or (len(essen) > 0 and time() < last_updated + 900): return last_updated = time()