Pass Database into the data store

This commit is contained in:
Erik Johnston 2019-12-06 13:40:02 +00:00
parent d64bb32a73
commit d537be1ebd
5 changed files with 24 additions and 28 deletions

View file

@ -238,8 +238,7 @@ class HomeServer(object):
def setup(self):
logger.info("Setting up.")
with self.get_db_conn() as conn:
datastore = self.DATASTORE_CLASS(conn, self)
self.datastores = DataStores(datastore, conn, self)
self.datastores = DataStores(self.DATASTORE_CLASS, conn, self)
conn.commit()
self.start_time = int(self.get_clock().time())
logger.info("Finished setting up.")