def _transform(self, scores): with self.qs.map() as pipe: for uid, score in scores: pipe.hgetall(get_key(self.prefix, 'uid', uid)) return [Action.from_data(data) for data in pipe.execute()]
def _transform(self, scores): results = [] with self.qs.map() as pipe: for uid, score in scores: results.append(pipe.hgetall(get_key(self.prefix, 'uid', uid))) return [Action.from_data(data) for data in results if data]