summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-03-06 19:56:48 -0600
committerDan McGee <dan@archlinux.org>2013-03-06 19:56:48 -0600
commit3e0209f5e8ee197034b6c1f705af515d8154801b (patch)
tree22d2cc81a596cbd6e26b9d9941abede6aa506075
parent71259ab4c27ca6f00e09e813c7d9c6e8e24d59b4 (diff)
Revert "mirrorcheck: Don't use bulk_create on sqlite3"
This reverts commit 3c4ceb16. We don't need this anymore as bulk_create gets automatic batching now on sqlite3 so it is safe to use. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--mirrors/management/commands/mirrorcheck.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py
index e09ea680..2116ab29 100644
--- a/mirrors/management/commands/mirrorcheck.py
+++ b/mirrors/management/commands/mirrorcheck.py
@@ -31,7 +31,6 @@ from django.core.management.base import NoArgsCommand
from django.db import transaction
from django.utils.timezone import now
-from main.utils import database_vendor
from mirrors.models import MirrorUrl, MirrorLog
logging.basicConfig(
@@ -208,11 +207,7 @@ class MirrorCheckPool(object):
logger.debug("joining on all threads")
self.tasks.join()
logger.debug("processing %d log entries", len(self.logs))
- if database_vendor(MirrorLog, mode='write') == 'sqlite':
- for log in self.logs:
- log.save(force_insert=True)
- else:
- MirrorLog.objects.bulk_create(self.logs)
+ MirrorLog.objects.bulk_create(self.logs)
logger.debug("log entries saved")
# vim: set ts=4 sw=4 et: