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:16 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-08-03 11:54:16 (GMT)
commit6e9371f30ed925ad6eb1a5a9a39d789909168c45 (patch)
tree9b50ae119d1e0cb0e64799abc48387cf8787349b
parenta17ac2aab066c2d8007b999ba8221d90bc11f019 (diff)
parent025831e760718631c6c8a55563d4c1139ac5c45b (diff)
Merge commit 'refs/top-bases/t/rainbow-0.8' into t/rainbow-0.8
-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 fbef496..62b843b 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):
@@ -334,7 +334,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)