1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 23:39:37 +02:00

fix: increase batch size for country downloads from 10 to 250

This commit is contained in:
Sean Morley 2025-01-13 11:24:25 -05:00
parent 7f2c3c33a5
commit 9a7667fd62

View file

@ -42,7 +42,7 @@ class Command(BaseCommand):
def handle(self, **options):
force = options['force']
batch_size = 10
batch_size = 250
countries_json_path = os.path.join(settings.MEDIA_ROOT, f'countries+regions+states-{COUNTRY_REGION_JSON_VERSION}.json')
if not os.path.exists(countries_json_path) or force:
res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/{COUNTRY_REGION_JSON_VERSION}/json/countries%2Bstates%2Bcities.json')