Commit 5beb5445 authored by Mario Chirinos's avatar Mario Chirinos

bulk upload

parent 9884d8d0
...@@ -9,7 +9,7 @@ from django.utils import timezone ...@@ -9,7 +9,7 @@ from django.utils import timezone
import dateutil.parser import dateutil.parser
import itertools import itertools
from datetime import date from datetime import date
from itertools import islice
updateRadioStations = False updateRadioStations = False
recordingsDir = "/home/geoint/M3_NFS/recordings/" recordingsDir = "/home/geoint/M3_NFS/recordings/"
...@@ -122,8 +122,6 @@ class Command(BaseCommand): ...@@ -122,8 +122,6 @@ class Command(BaseCommand):
news.topic_raw = json.domps(topicst) news.topic_raw = json.domps(topicst)
# news.save() # news.save()
objectsList.append(news) objectsList.append(news)
from itertools import islice
batch_size = 100 batch_size = 100
while True: while True:
batch = list(islice(objectsList, batch_size)) batch = list(islice(objectsList, batch_size))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment