def process_alert(self, route):
recipients = list(set(route["recipient_ids"]))
logging.debug("Processing alert for {}, recipients {}".format(
str(route), str(recipients)
))
if "*" in self.data:
recipients.append("*")
for recipient_id in recipients:
if not recipient_id in self.data:
continue
recipient = self.data[recipient_id]
if len(recipient["routes"]) < recipient["config"]["max_routes"]:
recipient["routes"].append(route)
else:
logging.debug("Discarding route {} for {}: buffer full ".format(
route["prefix"], recipient_id
))
invalidroutesreporter.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录