Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Merge pull request #56 from cfpb/revert-55-master
Browse files Browse the repository at this point in the history
Revert "MySQL can timeout with large regs. This should fix it."
  • Loading branch information
willbarton committed Oct 27, 2015
2 parents 9512673 + 42ba087 commit e38339a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions regcore/management/commands/import_reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import urlparse
import logging

from django import db

from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
from regcore_write.views import regulation, diff, layer, notice
Expand Down Expand Up @@ -224,11 +222,4 @@ def __init__(self):
label = filename_data[1]
old_version = filename_data[2]
new_version = filename_data[3]
diff.add(request, label, old_version, new_version)

# When using MySQL in Django 1.6 with very large regs it's
# entirely possible that the connection to the database will
# timeout before the transaction is done. The workaround
# appears to be to force the database connection closed.
# https://code.djangoproject.com/ticket/21597#comment:29
db.close_connection()
diff.add(request, label, old_version, new_version)

0 comments on commit e38339a

Please sign in to comment.