From f5ec5a61a9c0b12b0f17af577c7f2d7c0fcca047 Mon Sep 17 00:00:00 2001 From: Wookey Date: Thu, 20 Feb 2020 14:57:37 +0000 Subject: [PATCH 1/2] Move survex parsing later in the process as it tends to run out of memory --- databaseReset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/databaseReset.py b/databaseReset.py index d3bdbc9..9f5d288 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -90,9 +90,9 @@ def reset(): import_caves() import_people() import_surveyscans() - import_survex() import_logbooks() import_QMs() + import_survex() try: import_tunnelfiles() except: From 2838f540d1a407c63a97f5878d607fa63ab563cf Mon Sep 17 00:00:00 2001 From: Wookey Date: Thu, 20 Feb 2020 15:01:50 +0000 Subject: [PATCH 2/2] Minor text and whitespace fixes --- databaseReset.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/databaseReset.py b/databaseReset.py index 9f5d288..a242b81 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -168,7 +168,7 @@ def writeCaves(): def usage(): print("""Usage is 'python databaseReset.py ' where command is: - reset - this is normal usage, clear db and reread everything from files - time-consuming + reset - this is normal usage, clear database and reread everything from files - time-consuming desc - NOT WORKING: function resetdesc() missing caves - read in the caves logbooks - read in the logbooks, but read in people first @@ -183,8 +183,8 @@ def usage(): surveys tunnel - read in the Tunnel files writeCaves - - read in - always means read from files and put the information into the database - - write out - always means create the auto-generated files from the database + - read in - always means read from files and put the information into the database + - write out - always means create the auto-generated files from the database """) if __name__ == "__main__": @@ -241,7 +241,3 @@ if __name__ == "__main__": else: print("%s not recognised" % sys.argv) usage() - - - -