mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-29 17:59:36 +02:00
fix: reduce batch size for country downloads from 100 to 10
This commit is contained in:
parent
6413b9a985
commit
6252f3cf14
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
def handle(self, **options):
|
def handle(self, **options):
|
||||||
force = options['force']
|
force = options['force']
|
||||||
batch_size = 100
|
batch_size = 10
|
||||||
countries_json_path = os.path.join(settings.MEDIA_ROOT, f'countries+regions+states-{COUNTRY_REGION_JSON_VERSION}.json')
|
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:
|
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')
|
res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/{COUNTRY_REGION_JSON_VERSION}/json/countries%2Bstates%2Bcities.json')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue