Skip to content
Snippets Groups Projects
Commit c6e8322b authored by fmk17's avatar fmk17
Browse files

Fix crawler cache

parent 7e103ca2
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ def get_menus_by_days(location: Location):
global cached_responses
global cached_update_times
if location in cached_update_times and cached_update_times[location] < datetime.now() + timedelta(minutes=5):
if location in cached_update_times and cached_update_times[location] + timedelta(minutes=5) > datetime.now():
return (cached_responses[location], cached_update_times[location])
response = requests.get(location.value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment