Use a persistent sqlite db by default, rather than in-memory one.

This commit is contained in:
Ryan Kelly 2014-03-25 16:20:24 +11:00
parent 7d3a1a7d04
commit ad4afc0ed5
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ local
\.coverage \.coverage
*~ *~
nosetests.xml nosetests.xml
syncserver.db

View File

@ -24,7 +24,8 @@ def includeme(config):
secret = os.urandom(32).encode("hex") secret = os.urandom(32).encode("hex")
sqluri = settings.get("syncserver.sqluri") sqluri = settings.get("syncserver.sqluri")
if sqluri is None: if sqluri is None:
sqluri = "sqlite:///:memory:" rootdir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
sqluri = "sqlite:///" + os.path.join(rootdir, "syncserver.db")
# Configure app-specific defaults based on top-level configuration. # Configure app-specific defaults based on top-level configuration.
settings.pop("config", None) settings.pop("config", None)