zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #01578
Re: [Merge] lp:~zeitgeist/zeitgeist/small-find-events-optimization into lp:zeitgeist
Review: Needs Fixing
[...]
> - else: # return_mode == 0
> + if return_mode == 0:
> + log.debug("Found %d event IDs in %fs" % (len(result), time.time()- t))
> result = [row[0] for row in result]
> - log.debug("Fetched %d event IDs in %fs" % (len(result), time.time()- t))
> - return result
> + elif return_mode == 1:
> + log.debug("Found %d events in %fs" % (len(result), time.time()- t))
IMHO, this should be "Found %d event IDs(...]" too
> + result = self.get_events(ids=[row[0] for row in result], sender=sender)
> + elif return_mode == 2:
> + log.debug("Found %d (uri,timestamp) tuples in %fs" % (len(result), time.time()- t))
> + result = map(lambda row: (row[0], row[1]), result)
> + else:
> + raise Exception("%d" % return_mode)
> +
> + return result
>
> def find_eventids(self, *args):
> return self._find_events(0, *args)
>
>
>
--
https://code.launchpad.net/~zeitgeist/zeitgeist/small-find-events-optimization/+merge/34065
Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/small-find-events-optimization.
References