コード例 #1
0
ファイル: pingator.py プロジェクト: kachayev/gearoscope
    def __str__(self):
        if type(self.message['from']) == dict:
            self.message['from'] = self.format(**self.message['from'])

        return DictLogRecord.__str__(self)
コード例 #2
0
ファイル: gearmand.py プロジェクト: kachayev/gearoscope
    def __str__(self):
        queues  = len(self.message)
        workers = reduce(operator.add, [int(q['workers']) for q in self.message if type(q) == dict], 0)

        self.message = {'queues': queues, 'workers': workers, 'from': self.format(**self.server)}
        return DictLogRecord.__str__(self)