def process(self, pair): start, stop = pair #_p("Processing {} {}".format(start, stop)) #self.total += 1 rsp = client.EntityFilter(self.query, start=start, stop=stop) for card in rsp: if (hasattr(card, 'positiontype') is True) and\ (card.positiontype.get('cid') == '12166'): continue g = client.to_graph(card, models.Position) self.graph += g del g
def process(self, pair): start, stop = pair #_p("Processing {} {}".format(start, stop)) #self.total += 1 rsp = client.EntityFilter(self.query, start=start, stop=stop) for ety in rsp: item = client.Entity('Person', ety.cid) # FH people only if hasattr(item, 'fhpersontype'): if item.fhpersontype['cid'] == '6019159': g = client.to_graph(item, models.Person) self.graph += g
def get_total(self): rsp = client.EntityFilter(self.query, start=0, stop=1) total = rsp.number logging.info("Total positions found: {}.".format(total)) return total
def process(self, pair): start, stop = pair logging.info("Processing set {} to {}.".format(start, stop)) rsp = client.EntityFilter(self.query, start=start, stop=stop) for ety in rsp: self.graph += client.to_graph(ety, self.vmodel)