|
@@ -116,7 +116,7 @@ def sync_all_review(loc_id):
|
|
|
break
|
|
|
|
|
|
|
|
|
-def fetch_last_20_reviews(loc_id, page_size=200):
|
|
|
+def fetch_last_20_reviews(loc_id, page_size=20):
|
|
|
headers = get_auth_header()
|
|
|
url = get_review_list_url(loc_id)+'&pageSize='+str(page_size)
|
|
|
res = get(url, headers=headers)
|
|
@@ -202,7 +202,7 @@ def populate_reviews():
|
|
|
locations = Location.objects.all().values('location_id')
|
|
|
for loc in locations:
|
|
|
loc_id = loc.get('location_id')
|
|
|
- sync_all_review(loc_id)
|
|
|
+ fetch_last_20_reviews(loc_id, page_size=200)
|
|
|
end = timezone.now()
|
|
|
elapsed = end - start
|
|
|
print(f'Elapsed time: {elapsed.seconds//60} minutes and {elapsed.seconds % 60} secs.')
|