def act(self):
        key = self.name
        if not key:
            self.warning(logger, 'no valid aggregator name set')
            return
        try:
            value = float(self.get('value'))
        except:
            self.warning(logger, 'no valid value set')
            return
        user = self.get('user')
        if key not in monitor.aggregators:
            monitor.aggregators[key] = Aggregator()
        aggregator = monitor.aggregators[key]
        aggregator.add(value, user)
dataset/ETHPy150Open xumiao/pymonk/monk/roles/monitor.py/Aggregate.act/original