Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-08-03 11:54:07 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-08-03 11:54:07 (GMT)
commita5e1d7a9b4e72c97d95f7af0b2041b95734cf783 (patch)
treec262ea8c0c85a7f811bcb1db50f28e4b7d74e593
parent7c6c45225f39f2f532ec33932145497c57e8693a (diff)
parent1f6619f72ac2f4e5e19433c16c4f873ef80e06f9 (diff)
Merge commit 'refs/top-bases/t/query-typed-props' into t/query-typed-props
-rw-r--r--src/carquinyol/indexstore.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py
index 20c8d55..73f3ad9 100644
--- a/src/carquinyol/indexstore.py
+++ b/src/carquinyol/indexstore.py
@@ -41,7 +41,7 @@ _PREFIX_KEEP = 'K'
_FLUSH_THRESHOLD = 20
# Force a flush after _n_ seconds since the last change to the db
-_FLUSH_TIMEOUT = 60
+_FLUSH_TIMEOUT = 5
_PROPERTIES_NOT_TO_INDEX = ['timestamp', 'preview']
@@ -226,7 +226,7 @@ class IndexStore(object):
if not self._database:
return
- self._database.flush()
+ self._flush(True)
self._database = None
def remove_index(self):
@@ -337,7 +337,8 @@ class IndexStore(object):
def _flush(self, force=False):
"""Called after any database mutation"""
- logging.debug('IndexStore.flush: %r %r', force, self._pending_writes)
+ logging.debug('IndexStore.flush: force=%r _pending_writes=%r',
+ force, self._pending_writes)
self._set_index_updated(False)