← Back to team overview

zeitgeist team mailing list archive

[Merge] lp:~seif/zeitgeist/fix-693094 into lp:zeitgeist

 

Seif Lotfy has proposed merging lp:~seif/zeitgeist/fix-693094 into lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)
Related bugs:
  #693094 Zeitgeist engine tells that an event has been inserted even though it has been blocked by an extension
  https://bugs.launchpad.net/bugs/693094

For more details, see:
https://code.launchpad.net/~seif/zeitgeist/fix-693094/+merge/44581

Changed the log output to print how many events we requested to be inserted and how many were actually inserted.
-- 
https://code.launchpad.net/~seif/zeitgeist/fix-693094/+merge/44581
Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~seif/zeitgeist/fix-693094 into lp:zeitgeist.
=== modified file '_zeitgeist/engine/main.py'
--- _zeitgeist/engine/main.py	2010-11-29 09:09:13 +0000
+++ _zeitgeist/engine/main.py	2010-12-23 15:07:14 +0000
@@ -474,9 +474,10 @@
 
 	def insert_events(self, events, sender=None):
 		t = time.time()
+		log.debug("Requested to insert %d events" % len(events))
 		m = map(lambda e: self._insert_event_without_error(e, sender), events)
 		self._cursor.connection.commit()
-		log.debug("Inserted %d events in %fs" % (len(m), time.time()-t))
+		log.debug("Inserted %d events in %fs" % (len([e for e in m if e>0]), time.time()-t))
 		return m
 	
 	def _insert_event_without_error(self, event, sender=None):