def __populate_rules(self): self.logger.debug(pformat(self.rule)) self.rule.ListRules(placeId=self.place_id) if self.rule.success: while not hasattr(self.event_response, "body"): print("sleeping") time.sleep(1) rules = self.event_response.body["payload"]["attributes"]["rules"] db.populate_rules(rules) else: raise exception.PopulateDatabaseError(table="rules")
def __populate_people(self): self.logger.debug(pformat(self.place)) self.place.ListPersons() if self.place.success: while not hasattr(self.event_response, "body"): print("sleeping") time.sleep(1) people = self.event_response.body["payload"]["attributes"][ "persons"] db.populate_people(people) else: raise exception.PopulateDatabaseError(table="people")
def __populate_places(self): self.logger.debug(pformat(self.account)) self.account.ListPlaces() if self.account.success: while not hasattr(self.event_response, "body"): print("sleeping") time.sleep(1) places = self.event_response.body["payload"]["attributes"][ "places"] db.populate_places(places) else: raise exception.PopulateDatabaseError(table="places")