summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Reporting/Storage/DjangoORM.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Reporting/Storage/DjangoORM.py b/src/lib/Bcfg2/Reporting/Storage/DjangoORM.py
index fb7af7465..bca4a9c1e 100644
--- a/src/lib/Bcfg2/Reporting/Storage/DjangoORM.py
+++ b/src/lib/Bcfg2/Reporting/Storage/DjangoORM.py
@@ -224,7 +224,11 @@ class DjangoORM(StorageBase):
inter.extra_count = counter_fields[TYPE_EXTRA]
inter.save()
for entry_type in updates.keys():
- getattr(inter, entry_type).add(*updates[entry_type])
+ # batch this for sqlite
+ i = 0
+ while(i < len(updates[entry_type])):
+ getattr(inter, entry_type).add(*updates[entry_type][i:i+100])
+ i += 100
# performance metrics
for times in stats.findall('OpStamps'):