From dcbb804b94f12c15033d6b7029f9e435d930d1a1 Mon Sep 17 00:00:00 2001 From: boyska Date: Mon, 17 Jan 2022 00:03:48 +0100 Subject: [PATCH] additional DBs are loaded indeed refs #19 --- larigira/config.py | 1 + larigira/event.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/larigira/config.py b/larigira/config.py index 18fcde9..2d78f6a 100644 --- a/larigira/config.py +++ b/larigira/config.py @@ -19,6 +19,7 @@ def get_conf(prefix="LARIGIRA_"): conf["UMASK"] = None conf["CACHING_TIME"] = 10 conf["DB_URI"] = os.path.join(conf_dir, "db.json") + conf["DB_ADDITIONAL_DIR"] = os.path.join(conf_dir, "db.d") conf["SCRIPTS_PATH"] = os.path.join(conf_dir, "scripts") conf["EXTRA_STATIC_PATH"] = os.path.join(conf_dir, "extra") conf["EXTRA_MENU_LINKS"] = [] diff --git a/larigira/event.py b/larigira/event.py index ea41109..a403c1a 100644 --- a/larigira/event.py +++ b/larigira/event.py @@ -42,7 +42,7 @@ class Monitor(ParentedLet): self.running = {} self.conf = conf self.q = Queue() - self.model = EventModel(self.conf["DB_URI"]) + self.model = EventModel(self.conf["DB_URI"], self.conf['DB_ADDITIONAL_DIR']) self.ticker = Timer(int(self.conf["EVENT_TICK_SECS"]) * 1000, self.q) def _alarm_missing_time(self, timespec):