Skip to content

Commit

Permalink
sleep for 0.1 second b/t every request to google's API #64 #68
Browse files Browse the repository at this point in the history
  • Loading branch information
jotyGill committed Dec 3, 2017
1 parent 0700b73 commit ca5b103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openpyn/locations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import requests
from time import sleep


# takes server list outputs locations (each only once) the servers are in.
Expand All @@ -12,6 +13,7 @@ def get_unique_locations(list_of_servers):
# print(unique_locations)
for eachLocation in unique_locations:
geo_address_list = get_location_name(eachLocation)
sleep(0.1)
# geo_address_list = get_location_name(latitude=latitude, longitude=longitude)
resolved_locations.append(geo_address_list)
# print(resolved_locations)
Expand Down

0 comments on commit ca5b103

Please sign in to comment.