Merge pull request #4 from mozilla-services/use-persistent-db
Use a persistent sqlite db by default, rather than in-memory one.
This commit is contained in:
commit
a6eebee1de
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ local
|
|||||||
\.coverage
|
\.coverage
|
||||||
*~
|
*~
|
||||||
nosetests.xml
|
nosetests.xml
|
||||||
|
syncserver.db
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user