Browse Source

additional DBs are loaded indeed

refs #19
boyska 2 years ago
parent
commit
dcbb804b94
2 changed files with 2 additions and 1 deletions
  1. 1 0
      larigira/config.py
  2. 1 1
      larigira/event.py

+ 1 - 0
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"] = []

+ 1 - 1
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):