Ver Fonte

Some TODOs on the server after identifying a bug

Kirk Trombley há 4 anos atrás
pai
commit
6e0d5b11c2

+ 3 - 0
server/app/point_gen/random_street_view.py

@@ -24,6 +24,9 @@ def call_random_street_view(country_lock=None):
     This function calls the streetview metadata endpoint - there is no quota consumed.
     """
     if country_lock is None:
+        # TODO this is WRONG - this makes them all from one country!
+        # this whole logic needs to be tweaked - maybe just cache points by country?
+        # a world game should pick a random country N times
         country_lock = random.choice(VALID_COUNTRIES)
     try:
         rsv_js = requests.post(RSV_URL, data={"country": country_lock.lower()}).json()

+ 1 - 0
server/app/point_gen/urban_centers.py

@@ -77,6 +77,7 @@ class WorldUrbanPointSource(GeoPointSource):
         # Will make at most self.country_retries * self.max_attempts attempts to call urban_coord
         attempts = 0
         points = []
+        # TODO tweak this to just go point by point, should be simpler
         while len(points) < n:
             if attempts > self.max_attempts:
                 raise ExhaustedSourceError(points)