Exemplo n.º 1
0
    def run(self):
        self.whoosh_index = whooshindex.build(self.db_dir)
        # @todo: can we split the merge db in one class with sources and one without?
        self.merge_db = mergedb.MergeDB(os.path.join(self.db_dir, "merge.db"),
                                        self.schema_dir,
                                        local_db=None,
                                        enable_db_sync=False)

        self._update_index()
        while True:
            self.update_trigger.wait()
            self.update_trigger.clear()

            if self.stop_trigger.is_set():
                break
            self._update_index()
        logger.info("Stopping thread")
Exemplo n.º 2
0
 def setUp(self):
     # a merge db derives from base db
     self.merge_db = mergedb.MergeDB(":memory:", pydb.testing.guess_schema_dir(),
                                     local_db=None, enable_db_sync=False)
     self.assertTrue(isinstance(self.merge_db, basedb.BaseDB))
Exemplo n.º 3
0
 def setUp(self):
     self.merge_db = mergedb.MergeDB(":memory:",
                                     pydb.testing.guess_schema_dir(),
                                     local_db=None,
                                     enable_db_sync=False)