From 376ff08dfb22ef837c0b77f89774168edc1f9f4c Mon Sep 17 00:00:00 2001
From: Gonzalo Odiard <godiard@gmail.com>
Date: Fri, 14 Dec 2012 15:34:41 -0300
Subject: [PATCH] Flush the index before send created signal - SL #4306
After check the sequence of events, I found than at times,
the Created dbus signal before the index was flushed.
This patch check if the index is updated, and if not, flush it
inmediatly before the signal is emited.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
---
src/carquinyol/datastore.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/carquinyol/datastore.py b/src/carquinyol/datastore.py
index 212901b..93f335b 100644
a
|
b
|
class DataStore(dbus.service.Object): |
261 | 261 | if exc is not None: |
262 | 262 | async_err_cb(exc) |
263 | 263 | return |
| 264 | if not self._index_store.get_index_updated(): |
| 265 | self._index_store.flush() |
264 | 266 | |
265 | 267 | self.Created(uid) |
266 | 268 | self._optimizer.optimize(uid) |