Example #1
0
 def enableAutoReindex(self, enabled=True):
     """
     Enable or disable auto reindex
     """
     if enabled:
         subscribers.init()
     self._reindex_queue_processor.enabled = enabled
Example #2
0
File: db.py Project: zerodb/zerodb
 def enableAutoReindex(self, enabled=True):
     """
     Enable or disable auto reindex
     """
     if enabled:
         subscribers.init()
     self._reindex_queue_processor.enabled = enabled
Example #3
0
    def _init_db(self):
        """We need this to be executed each time we are in a new process"""
        if self._autoreindex:
            subscribers.init()

        self.__conn_refs = {}
        self.__thread_local = threading.local()
        self.__thread_watcher = ThreadWatcher()
        self._storage = client_storage(**self.__storage_kwargs)
        self._db = DB.db_factory(self._storage, **self.__db_kwargs)
        self._conn_open()