Merge lp:~seif/zeitgeist/fix-693094 into lp:zeitgeist/0.1

Proposed by Seif Lotfy
Status: Merged
Merge reported by: Seif Lotfy
Merged at revision: not available
Proposed branch: lp:~seif/zeitgeist/fix-693094
Merge into: lp:zeitgeist/0.1
Diff against target: 15 lines (+3/-2)
1 file modified
_zeitgeist/engine/main.py (+3/-2)
To merge this branch: bzr merge lp:~seif/zeitgeist/fix-693094
Reviewer Review Type Date Requested Status
Siegfried Gevatter Approve
Review via email: mp+44581@code.launchpad.net

Description of the change

Changed the log output to print how many events we requested to be inserted and how many were actually inserted.

To post a comment you must log in.
lp:~seif/zeitgeist/fix-693094 updated
1651. By Seif Lotfy

make log statement more informative

Revision history for this message
Siegfried Gevatter (rainct) wrote :

Remove te first log statement ("requested.."), that duplicates the same info as below. Also, shouldn't that ", m," be len(m)?

review: Needs Fixing
lp:~seif/zeitgeist/fix-693094 updated
1652. By Seif Lotfy

removed redundant log print and fixed the output of insert_events

1653. By Seif Lotfy

update from trunk

Revision history for this message
Siegfried Gevatter (rainct) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_zeitgeist/engine/main.py'
2--- _zeitgeist/engine/main.py 2010-11-29 09:09:13 +0000
3+++ _zeitgeist/engine/main.py 2010-12-28 22:39:08 +0000
4@@ -475,8 +475,9 @@
5 def insert_events(self, events, sender=None):
6 t = time.time()
7 m = map(lambda e: self._insert_event_without_error(e, sender), events)
8- self._cursor.connection.commit()
9- log.debug("Inserted %d events in %fs" % (len(m), time.time()-t))
10+ self._cursor.connection.commit()
11+ log.debug("Inserted %d events out of %d in %fs"\
12+ % (len([e for e in m if e>0]), len(m), time.time()-t))
13 return m
14
15 def _insert_event_without_error(self, event, sender=None):

Subscribers

People subscribed via source and target branches