def enableAutoReindex(self, enabled=True): """ Enable or disable auto reindex """ if enabled: subscribers.init() self._reindex_queue_processor.enabled = enabled
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()