diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-08-03 11:54:14 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-08-03 11:54:14 (GMT) |
commit | 685bf5f6bfc510ff9a60697058fab9aef10f45d1 (patch) | |
tree | 1dac2581ed030a5f888af9c73097908a7d1c05f2 | |
parent | 8792d4816280d455f03725b55daaa9c5b0d7a859 (diff) | |
parent | 025831e760718631c6c8a55563d4c1139ac5c45b (diff) |
Merge commit 'refs/top-bases/t/migration-rebuild-index' into t/migration-rebuild-index
-rw-r--r-- | src/carquinyol/indexstore.py | 7 |
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) |