def _get_all_user(self): find_resp = self._db.AllUserLikes(database_pb2.AllUsersRequest()) if find_resp.result_type == database_pb2.UsersResponse.ERROR: self._logger.error( 'Error getting AllUserLikes for Cosine: {}'.format(find_resp.error)) return [] return self._clean_user_entries(find_resp.results)
def _load_data(self): users_resp = self._db.AllUsers(database_pb2.AllUsersRequest()) if users_resp.result_type == database_pb2.UsersResponse.ERROR: self._logger.error('Could not get users from database: %s', users_resp.error) return [(u.global_id, u.host_is_null) for u in users_resp.results]
def all_users(self): req = database_pb2.AllUsersRequest() res = self.users.AllUsers(req, self.ctx) print(res.error) self.assertNotEqual(res.result_type, database_pb2.UsersResponse.ERROR) return res