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:12 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-08-03 11:54:12 (GMT)
commit9e99a704a2a724f2480d2b2ecbc49aefb058669c (patch)
tree77f3e5ed19036ca174af45115d1ccfe48b289a74
parent4fd9164055bb1f62c6f911b7fd2c5b8e400bbd02 (diff)
parent1de09d9eaa178a5328667bba920c66cd613fcd1c (diff)
Merge commit 'refs/top-bases/t/bug-1550-mkstemp-only' into t/bug-1550-mkstemp-only
-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)