mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
more thorough reset before running :memory:
This commit is contained in:
parent
f326bf9148
commit
ac7cb45f61
@ -249,11 +249,11 @@ class JobQueue():
|
||||
|
||||
def run(self):
|
||||
self.loadprofiles()
|
||||
|
||||
# save db settings for later
|
||||
dbengine = settings.DATABASES['default']['ENGINE']
|
||||
dbname = settings.DATABASES['default']['NAME']
|
||||
dbdefault = settings.DATABASES['default']
|
||||
|
||||
|
||||
if dbname ==":memory:":
|
||||
# just run, and save the sql file
|
||||
print "-- ", settings.DATABASES['default']['NAME'], settings.DATABASES['default']['ENGINE']
|
||||
@ -265,8 +265,19 @@ class JobQueue():
|
||||
# run all the imports through :memory: first
|
||||
settings.DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3'
|
||||
settings.DATABASES['default']['NAME'] = ":memory:"
|
||||
settings.DATABASES['default']['USER'] = ""
|
||||
settings.DATABASES['default']['PASSWORD'] = ""
|
||||
settings.DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3',
|
||||
'AUTOCOMMIT': True,
|
||||
'ATOMIC_REQUESTS': False,
|
||||
'NAME': ':memory:',
|
||||
'CONN_MAX_AGE': 0,
|
||||
'TIME_ZONE': 'UTC',
|
||||
'OPTIONS': {},
|
||||
'HOST': '',
|
||||
'USER': '',
|
||||
'TEST': {'COLLATION': None, 'CHARSET': None, 'NAME': None, 'MIRROR': None},
|
||||
'PASSWORD': '',
|
||||
'PORT': ''}
|
||||
|
||||
|
||||
print "-- ", settings.DATABASES['default']['NAME'], settings.DATABASES['default']['ENGINE']
|
||||
print "-- DATABASES.default", settings.DATABASES['default']
|
||||
|
Loading…
Reference in New Issue
Block a user