caching only if some meals were found last time
Signed-off-by: Konrad <klux2@hs-mittweida.de>
This commit is contained in:
parent
e9cac9429b
commit
a751903eee
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ async def get_essen(only_today: bool) -> None:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
global datum, essen, essen_eng, var, last_updated # , ctx
|
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
|
return
|
||||||
last_updated = time()
|
last_updated = time()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue