Ticket #4306: flush_index.patch

File flush_index.patch, 720 bytes (added by erikos, 11 years ago)

This patch does force to flush the index, otherwise we do have the 5 seconds timeout

  • src/carquinyol/indexstore.py

    diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py
    index d922100..24bdbcb 100644
    a b class IndexStore(object): 
    302302            self._database.replace_document(_PREFIX_FULL_VALUE + \
    303303                _PREFIX_UID + uid, document)
    304304
    305         self._flush()
     305        self._flush(True)
    306306
    307307    def find(self, query):
    308308        offset = query.pop('offset', 0)
    class IndexStore(object): 
    353353
    354354    def delete(self, uid):
    355355        self._database.delete_document(_PREFIX_FULL_VALUE + _PREFIX_UID + uid)
    356         self._flush()
     356        self._flush(True)
    357357
    358358    def get_activities(self):
    359359        activities = []