diff options
author | Philip Sargent <philip@Muscogee.localdomain> | 2020-05-13 19:57:07 +0100 |
---|---|---|
committer | Philip Sargent <philip@Muscogee.localdomain> | 2020-05-13 19:57:07 +0100 |
commit | e4290c4ab00247abb6ec5d8f599242f7cde50af7 (patch) | |
tree | 9523c821179334049ccd1d1e7e562dbf38dc094c /databaseReset.py | |
parent | 2918b4b92c65e66e0cf85738d2827bc34ccd2196 (diff) | |
download | troggle-e4290c4ab00247abb6ec5d8f599242f7cde50af7.tar.gz troggle-e4290c4ab00247abb6ec5d8f599242f7cde50af7.tar.bz2 troggle-e4290c4ab00247abb6ec5d8f599242f7cde50af7.zip |
adding *ref to troggle svx parser
Diffstat (limited to 'databaseReset.py')
-rw-r--r-- | databaseReset.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/databaseReset.py b/databaseReset.py index 2387a44..455de8d 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -266,16 +266,17 @@ class JobQueue(): print "-- ", settings.DATABASES['default']['NAME'], settings.DATABASES['default']['ENGINE'] # but because the user may be expecting to add this to a db with lots of tables already there, - # the jobque may not start from scratch so we need to initialise the db properly first. + # the jobque may not start from scratch so we need to initialise the db properly first + # because we are using an empty :memory: database # But initiating twice crashes, so be sure to do it once only. if ("reinit",reinit_db) not in self.queue: reinit_db() if ("dirsredirect",dirsredirect) not in self.queue: dirsredirect() if ("caves",import_caves) not in self.queue: - import_caves() + import_caves() # sometime extract the initialising code from this and put in reinit if ("people",import_people) not in self.queue: - import_people() + import_people() # sometime extract the initialising code from this and put in reinit django.db.close_old_connections() # maybe not needed here @@ -290,6 +291,7 @@ class JobQueue(): settings.DATABASES['default']['NAME'] = dbname print "-- ", settings.DATABASES['default']['NAME'], settings.DATABASES['default']['ENGINE'] + django.db.close_old_connections() # maybe not needed here for j in self.results_order: self.results[j].pop() # throw away results from :memory: run self.results[j].append(None) # append a placeholder |