def create_anomalous_event(bucket, target, metrics, timestamp): event = models.add_event(bucket, target, metrics, timestamp) models.mark_event_as_anomalous(event)
def post(self, bucket, target, timestamp=None): event = self.create_event(bucket, target, self.request.arguments, timestamp) if self.detector.detect_anomaly(event): models.mark_event_as_anomalous(event)