app.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:navdoon 作者: farzadghanei 项目源码 文件源码
def create_destinations(self):
        # type: () -> List[AbstractDestination]
        destinations = []  # type: List[AbstractDestination]
        if self._config.get('flush_stdout'):
            destinations.append(Stdout())
        if self._config.get('flush_graphite'):
            for graphite_address in self._config['flush_graphite'].split(','):
                graphite_address = graphite_address.strip().split(':')
                graphite_host = graphite_address.pop(0).strip()
                graphite_port = graphite_address and int(graphite_address.pop(
                )) or 2003
                destinations.append(Graphite(graphite_host, graphite_port))
        if self._config.get('flush_file'):
            for file_path in self._config['flush_file'].split('|'):
                destinations.append(TextFile(file_path))
        if self._config.get('flush_file_csv'):
            for file_path in self._config['flush_file_csv'].split('|'):
                destinations.append(CsvFile(file_path))
        return destinations
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号