Esempio n. 1
0
def save_anomalies(store, anomaly_list):
    for anomaly in anomaly_list:
        newanom = Anomalies()
        newanom.alarm = anomaly[2]
        newanom.date = anomaly[0]
        newanom.events = anomaly[1]
        store.add(newanom)
Esempio n. 2
0
def save_anomalies(store, when_anomaly, anomaly_desc, alarm_raised):

   newanom = Anomalies()

   newanom.alarm = alarm_raised
   newanom.stored_when = when_anomaly
   newanom.events = anomaly_desc

   store.add(newanom)
Esempio n. 3
0
def save_anomalies(store, anomaly_list):
    for anomaly in anomaly_list:
        anomaly_date, anomaly_desc, alarm_raised = anomaly

        newanom = Anomalies()
        newanom.alarm = alarm_raised
        newanom.date = anomaly_date
        newanom.events = anomaly_desc
        log.debug("adding new anomaly in to the record: %s, %s, %s" % (alarm_raised, anomaly_date, anomaly_desc))
        store.add(newanom)

    if len(anomaly_list):
        log.debug("save_anomalies: Saved %d anomalies collected during the last hour" % len(anomaly_list))
Esempio n. 4
0
def save_anomalies(store, anomaly_list):
    for anomaly in anomaly_list:
        anomaly_date, anomaly_desc, alarm_raised = anomaly

        newanom = Anomalies()
        newanom.alarm = alarm_raised
        newanom.date = anomaly_date
        newanom.events = anomaly_desc
        log.debug("adding new anomaly in to the record: %s, %s, %s" % (alarm_raised, anomaly_date, anomaly_desc))
        store.add(newanom)

    if len(anomaly_list):
        log.debug("save_anomalies: Saved %d anomalies collected during the last hour" % len(anomaly_list))
Esempio n. 5
0
def save_anomalies(store, anomalies_list):
    anomalies_counter = 0
    for anomaly in anomalies_list:
        anomalies_counter += 1
        when_anomaly, anomaly_desc, alarm_raised = anomaly

        newanom = Anomalies()
        newanom.alarm = alarm_raised
        newanom.stored_when = when_anomaly
        newanom.events = anomaly_desc
        store.add(newanom)

    if anomalies_counter:
        log.debug("save_anomalies: Saved %d anomalies collected during the last hour" %
                  anomalies_counter)
Esempio n. 6
0
def save_anomalies(store, anomalies_list):
    anomalies_counter = 0
    for anomaly in anomalies_list:
        anomalies_counter += 1
        anomaly_date, anomaly_desc, alarm_raised = anomaly

        newanom = Anomalies()
        newanom.alarm = alarm_raised
        newanom.date = anomaly_date
        newanom.events = anomaly_desc
        store.add(newanom)

    if anomalies_counter:
        log.debug("save_anomalies: Saved %d anomalies collected during the last hour" %
                  anomalies_counter)