Beispiel #1
0
 def work(self, org_id, **kw):
     org = Org.query.get(org_id)
     comparisons = {}
     for facet in self.get_facets(org, **kw):
         ids = self.get_content_item_ids(org, facet, **kw)
         if len(ids):
             cc = ContentComparison(org, ids)
             comparisons[facet] = list(cc.execute())
     return self.format_comparisons(comparisons)
Beispiel #2
0
 def work(self, org_id, **kw):
     org = Org.query.get(org_id)
     comparisons = {}
     for facet in self.get_facets(org, **kw):
         ids = self.get_content_item_ids(org, facet, **kw)
         if len(ids):
             cc = ContentComparison(org, ids)
             comparisons[facet] = list(cc.execute())
     return self.format_comparisons(comparisons)
 def work(self, org_id, **kw):
     org = db.session.query(Org).get(org_id)
     metrics = org.content_metric_comparisons
     comparisons = {}
     for facet in self.get_facets(org, **kw):
         ids = self.get_content_item_ids(org, facet, **kw)
         if len(ids):
             cc = ContentComparison(org, ids, metrics)
             comparisons[facet] = list(cc.execute())
     db.session.remove()
     return self.format_comparisons(comparisons)
 def work(self, org_id, **kw):
     org = db.session.query(Org).get(org_id)
     metrics = org.content_metric_comparisons
     comparisons = {}
     for facet in self.get_facets(org, **kw):
         ids = self.get_content_item_ids(org, facet, **kw)
         if len(ids):
             cc = ContentComparison(org, ids, metrics)
             comparisons[facet] = list(cc.execute())
     db.session.remove()
     return self.format_comparisons(comparisons)