Handle race in database creation when running multiple WSGI instances

pull/17/head
JanB 9 years ago
parent 24b2b0a1ce
commit df480160da

@ -161,6 +161,10 @@ Session.configure(bind=engine)
session = Session() session = Session()
if not os.path.exists(dbpath): if not os.path.exists(dbpath):
Base.metadata.create_all(engine) try:
create_default_config() Base.metadata.create_all(engine)
create_admin_user() create_default_config()
create_admin_user()
except Exception:
pass

Loading…
Cancel
Save