From 8f7f22c90e92ccafafa4956ba006624c3f90ab5e Mon Sep 17 00:00:00 2001 From: Ovidiu Ghinet Date: Sat, 3 Sep 2016 11:16:33 +0200 Subject: [PATCH] Fixed cache validation... --- pokemongo_bot/walkers/polyline_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/walkers/polyline_generator.py b/pokemongo_bot/walkers/polyline_generator.py index 02f2f70388..80ab744d13 100644 --- a/pokemongo_bot/walkers/polyline_generator.py +++ b/pokemongo_bot/walkers/polyline_generator.py @@ -27,7 +27,7 @@ def cached_polyline(origin, destination, speed, google_map_api_key=None): abs_offset = haversine.haversine(tuple(origin), PolylineObjectHandler._cache.get_last_pos())*1000 else: abs_offset = float("inf") - is_old_cache = lambda : abs_offset < 8 # Consider cache old if we identified an offset more then 8 m + is_old_cache = lambda : abs_offset > 8 # Consider cache old if we identified an offset more then 8 m new_dest_set = lambda : tuple(destination) != PolylineObjectHandler._cache.destination if PolylineObjectHandler._run and (not is_old_cache()):