def _save_ids(self, ids): if self.bulk: AsyncIndicator.bulk_creation(ids, self.referenced_type, self.domain, self.config_ids) else: for id_ in ids: change = FakeChange(id_, self.fake_change_doc) AsyncIndicator.update_from_kafka_change(change, self.config_ids)
def _save_ids(self, ids): if self.bulk: AsyncIndicator.bulk_creation(ids, self.referenced_type, self.domain, self.config_ids) else: for id_ in ids: change = FakeChange(id_, self.fake_change_doc) AsyncIndicator.update_from_kafka_change( change, self.config_ids)
def _setup_docs_and_indicators(self): self.docs = [{ "_id": str(i), "domain": self.domain.name, "doc_type": "CommCareCase", "name": 'doc_name_' + str(i), "color": 'doc_color_' + str(i) } for i in range(10)] self.doc_ids = [str(i) for i in range(10)] AsyncIndicator.bulk_creation([doc["_id"] for doc in self.docs], "CommCareCase", self.domain, [])
def _setup_docs_and_indicators(self): self.docs = [ { "_id": str(i), "domain": self.domain.name, "doc_type": "CommCareCase", "name": 'doc_name_' + str(i), "color": 'doc_color_' + str(i) } for i in range(10) ] self.doc_ids = [str(i) for i in range(10)] AsyncIndicator.bulk_creation( [doc["_id"] for doc in self.docs], "CommCareCase", self.domain, [] )