示例#1
0
文件: notify.py 项目: CMGS/eru-core
 def store_and_broadcast(self, iterable):
     """iter完这个generator并且返回最后一个"""
     line = ''
     for line in iterable:
         rds.rpush(self.log_key, line)
         rds.publish(self.publish_key, line)
     return line
示例#2
0
 def store_and_broadcast(self, iterable):
     for line in iterable:
         rds.rpush(self.log_key, line)
         rds.publish(self.publish_key, line)