comparison src/browser/sat_browser/panels.py @ 579:4a0f2f294ea2

browser_side (blogs): massive insertion display the actual number of blogs being inserted
author souliane <souliane@mailoo.org>
date Sun, 19 Oct 2014 02:45:18 +0200
parents e1a773a64fb6
children 79fbc20c786b
comparison
equal deleted inserted replaced
578:668bb04e9708 579:4a0f2f294ea2
802 802
803 def massiveInsert(self, mblogs): 803 def massiveInsert(self, mblogs):
804 """Insert several microblogs at once 804 """Insert several microblogs at once
805 @param mblogs: dictionary of microblogs, as the result of getMassiveLastGroupBlogs 805 @param mblogs: dictionary of microblogs, as the result of getMassiveLastGroupBlogs
806 """ 806 """
807 log.debug("Massive insertion of %d microblogs" % len(mblogs)) 807 count = sum([len(value) for value in mblogs.values()])
808 log.debug("Massive insertion of %d microblogs" % count)
808 for publisher in mblogs: 809 for publisher in mblogs:
809 log.debug("adding blogs for [%s]" % publisher) 810 log.debug("adding blogs for [%s]" % publisher)
810 for mblog in mblogs[publisher]: 811 for mblog in mblogs[publisher]:
811 if not "content" in mblog: 812 if not "content" in mblog:
812 log.warning("No content found in microblog [%s]", mblog) 813 log.warning("No content found in microblog [%s]", mblog)