From c13734f56e9b01a61cfb66019a71d46c3dfe6f86 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 2 Sep 2023 21:48:53 +0300 Subject: Add tinydb --- aggro.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'aggro.py') diff --git a/aggro.py b/aggro.py index b5c6ce0..30b176e 100644 --- a/aggro.py +++ b/aggro.py @@ -5,6 +5,7 @@ import time from app.AggroConfig import AggroConfig from app.MemoryState import memory_state from app.PluginManager import PluginManager +from app.database import setup_db def run_plugin_thread(): @@ -22,9 +23,13 @@ if __name__ == "__main__": aggrofile_content = json.loads(f.read()) aggro_config = AggroConfig( - plugins=aggrofile_content["plugins"], graph=aggrofile_content["graph"] + db_path=aggrofile_content.get("db_path", "db.json"), + plugins=aggrofile_content["plugins"], + graph=aggrofile_content["graph"], ) + setup_db(aggro_config) + manager = PluginManager(aggro_config) manager.build_plugin_instances() -- cgit v1.3